I'm having trouble with the logic in my "Code your Own Adventure" program on Code Academy. I expect it to display "Great, come get your pizza!" when I enter PIZZA, YES, and YES as prompts, but instead it says "NO pizza for you!" I've tried using both "Yes" and 'YES' within the if statement for the PIZZA case, but neither option returns the correct response. Any help would be greatly appreciated, even though this may seem like a basic question only useful for beginners.
var user = prompt("Would you like to buy PIZZA, a HAMBURGER or a TACO?").toUpperCase();
switch(user) {
case 'PIZZA':
var money = prompt("Do you have at least $10? (YES/NO)").toUpperCase;
var cheeseOk = prompt("Do you tolerate cheese? (YES/NO)").toUpperCase;
if (money === 'YES' && cheeseOk === 'YES') {
console.log("Great, come get your pizza");
} else {
console.log("NO pizza for you!");
}
break;
case 'HAMBURGER':
var getCheese = prompt("Do you want cheese on that? (YES/NO)").toUpperCase;
var hungry = prompt("Are you really hungry? (YES/NO)").toUpperCase;
if (getCheese === 'YES' || hungry === 'YES') {
console.log("Great, come get your burger!");
} else {
console.log("NO burger for you!");
}
break;
case 'TACO':
prompt("AUTHENTIC or TACO BELL?").toUpperCase;
break;
default:
console.log("We don't have that. Sorry.");
break;
}