5/6 Passed but no output


#1

var user = prompt("What would you like do do here, RUN,PAY or FIGHT?").toUpperCase();
switch(user){
case "pay":
console.log("You better decide quick!");
break;
case "RUN":
var fast = prompt("Are you a fast runner?(YES or NO)").toUpperCase()
var quick =prompt("Are you quick and nimble?(YES or NO)").toUpperCase()

if( fast === "YES" || quick === "YES") {

console.log("Alright, you should be able to get away!"); }
else {
console.log("I don't think you'll be able to get away! He's quite the runner!");
}
break;
case "FIGHT":
var strong = prompt("Are you very strong?(YES or NO)").toUpperCase()
var smart = prompt("Are you quite intelligent?(YES or NO)").toUpperCase()
if( strong === "yes" || smart === "yes") {
console.log("Good, as long as you have the strength or the wits, you should be fine!");
}
else if (strong === "no" && smart === "no") {
console.log("I'm not so sure this a good idea then!");
}

break;
default:
console.log("Come on, we don't have much time!")
};

This code passed for me
However hen I input "FIGHT" and follow the yes or no prompts, it passes but no output is shown. My console.log strings are not showing up for any yes/no combination for "FIGHT"


#2

You didn't capitalize "no", even though you told the code to make it to upper case. You must change

if( strong === "yes" || smart === "yes") {

and

else if (strong === "no" && smart === "no") {

INTO

if(strong === "YES" || smart === "YES") {

else if (strong === "NO" && smart === "NO") {

Hope it helped! :smiley:


#3

Perfect, solved the problem. Thank you!