5/6 Unexpected EOF


Im getting an 'Unexpected EOF' response with the following code. A bit confused here.

var user = prompt("What would you like for dinner?").toUpperCase();

    case 'PANCAKES':
        if(user === 'PANCAKES' && user === 'DOGFOOD'){
            console.log("That sounds really gross");
            console.log("I love pancakes:);
    case 'BURGER':
            if(user === 'BURGER' || user === 'PANCAKES'){
                console.log("Sounds great! I'm in!");
    case 'JUNK FOOD':
        console.log("That's not good for dinner");
        console.log("I don't think we can eat that.");


I truly do not know what 'Unexpected EOF' is, but I can see some flaws in your code.

First of all, you need another bracket to finish the first bracket in the "switch". Also, on the first "if" and "else" statement, you need to take out the colon that's after "I love pancakes. You also need a quotation mark there. That's actually all the problems I see in there, and if I'm wrong, I'm sorry. But try it out. :smile:


Everything you mentioned but the extra curly bracket was correct. It works now. Thank you very much!


Just for the record, the EOF in 'Unexpected EOF' means End Of File. So as the } is missing the interpreter assumes that you're just not yet ready with your program.