I dont know what I did wrong i reviewed it but says error in syntax. please help


#1

var user = prompt("Are you ready to start your adventure young one?");
var answer= prompt("Alright chose Run, Fight, or Travel.").toLowerCase();

switch (user){
case 'RUN':
invalid = false;
break;
case 'FIGHT':
battle(goblin);
invalid = false;
break;
case 'TRAVEL':
invalid = false;
break;
case 'PAY':
invalid = false;
break;
default:
console.log("That's not a valid input!");
}
var strong = prompt("How courageous! Are you strong (YES or NO)?").toUpperCase();
var smart = prompt("Are you smart?").toUpperCase();
if(strong === 'YES' || smart === 'YES') {
console.log("You only need one of the two! You beat the troll--nice work!");
}
else {
console.log("To bad you should train more.")
}
case 'PAY':
var money = prompt("All right, we'll pay the man. Do you have any money (YES or NO)?").toUpperCase();
var dollars = prompt("Is your money in gold").toUpperCase();
if(money === 'YES' && gold === 'YES') {
console.log("Great! You pay the man and continue on your journey with food.");
}
else {
console.log("Dang! This stand only takes gold coins. You get Slumped!");
}
break;


#2

for starters you have written .toLowerCase in your code but you are using upperCase in your switch


#3

you are using case: outside your switch function