8/14 SyntaxError: Unexpected token {


#1

var answer = prompt("Do you like cheese?") {
switch (answer);
case 'NO!':
console.log("I do like cheese");
break;
case 'Depends':
console.log("Okay");
break;
case 'Absolutely!':
console.log("You are just like me");
break;

            default: 
            console.log("Sorry, try another answer");

};

SyntaxError: Unexpected token {


#2

You used a { after the prompt where it is not necessary but you forgot the { after switch where it is necessary (also get rid of the semicolon there).


#3

Thanks man! It works now