I keep getting it wrong. HEEELLLLPPPP


#1

This is what i did......

var food = prompt("What's your favorite food?", 'Type your favorite food here');

switch(lunch) {
case 'Sandwich':
console.log("Yum, I love wheat bread");
break;
case'pie':
console.log("Pie is a dessert");
break;
default:
console.log("Huh! I'm not sure what"+ food + "is. You like pizza?");

}

Please help!!!!


#2

You wrote

switch(lunch){}

but lunch is not defined anywhere

rather it mus be

switch (food){}

#3

You declared "food" at the top, however, in your switch statement, you used "lunch". Those two gotta be the same to make the switch statement work.

var food = prompt("What's your favorite food?", 'Type your favorite food here');
    
    switch(food) {
        case 'sandwich':
            console.log("Yum, I love wheat bread");
        break;
        
        case'pie':
            console.log("Pie is a dessert");
        break;
        
        default:
            console.log("Huh! I'm not sure what a "+ food + " is. You like pizza?");
    
    }