Code your own adventure two problems


#1

Im really not sure what the problem is

var troll = prompt("After you ate the pigs that army came back and saw you ate their pigs what do you do. RUN away, FIGHT them, or HIDE?").toUpperCase();

switch (troll) {
case 'FIGHT':
var strong = prompt("How courageous! Are you strong (YES or NO)?").toUpperCase();
var smart = prompt("Are you smart?").toUpperCase();
if (strong === 'YES' || smart === 'YES') {
var get rekted = prompt("YOu may be courageus but your not that smart");
} else {
var notSmart = prompt("You're not strong OR smart? Well, They mimic you so they don't destroy you");
}
break;
case 'PAY':
var money = prompt("All right, we'll pay the army. Do you have any money (YES or NO)?").toUpperCase();
var dollars = prompt("Is your money in Pigs?").toUpperCase();
if (money === 'YES' && dollars === 'YES') {
var log = prompt("They kill you so that they get their money in pigs");
} else {
var REkt = prompt("They make you steal and hunt wild pigs for the next 10 years and your very unhappy");
}
break;
case 'RUN':
var fast = prompt("Let's book it! Are you fast (YES or NO)?").toUpperCase();
var headStart = prompt("Did you get a head start?").toUpperCase();
if (fast === 'YES' || headStart === 'YES') {
var damoreSpeed = prompt("you just ate and you slowly walk away but they chase you down");
} else {
var nospeed = prompt("You're not fast but you jump on a horse and flee");
}
break;
default:
var coin = prompt("I didn't understand your choice. Hit Run and try again, this time picking FIGHT, PAY, or RUN!");
}


#2

Hey @megarockstar35558! Your problem was that you cant include a space when you name a variable. It has to be one word. So your spot of problem was here:

You cant say var get reketed; , Instead you can do var getRekted;

Hope this helped! If it didnt pls reply saying so!