5/6 Logical Operators


#1

I am sure there are other issues, but this is the first error I am getting "SyntaxError: expected expression, got '.'"

Can anyone point out what is causing this?

var user = prompt ("Your car breaks down on the side of the road, do you call, fix or walk?").toUpperCase();

switch(user){
case 'CALL' :
var chooseCall = prompt("Do you have enough phone battery?");
if (chooseCall === "YES" || "Maybe").toUpperCase();{
console.log("You call for a tow truck")
}else if (chooseCall === "NO").toUpperCase();{
console.log("Better figure something else out.");
}else{
console.log("Yes, Maybe or No?");
}
break;
case 'FIX' :
var chooseFix = prompt("What tools do you have?");
if (chooseFix === "Hammer" && "Wrench" ).toUpperCase(); {
console.log("You did it! Back on the road!");
}else if (chooseFix === "Hammer").toUpperCase();{
console.log("If only you had a wrench too...");
}else{
console.log("Choose hammer and/or wrench.")
}
break;
case 'WALK' :
var chooseWalk = prompt("Do you have shoes and socks?");
if (chooseWalk === "Yes").toUpperCase(); {
console.log("Alright, better get going then");
}else if (chooseWalk === "No").toUpperCase();{
console.log("You would surely perish. Maybe there is a better option?");
}else{
console.log("I repeat, do you have socks? Yes or no?")
}
break;
default :
console.log("Please choose one of the options presented");
};


#2

you really want to =upperCase= the condition of an IF-statement ?!!
you cannot do that....

Please read
= https://developer.mozilla.org/nl/docs/Web/JavaScript/Reference/Statements/if...else
and take notice of the =expression= expected in your condition