Getting "Unexpected Token {" Error


#1

Here's my code

var user = prompt("Do you want PANCAKES, WAFFLES, or FRENCH TOAST?").toUpperCase();

switch(user) {

case 'PANCAKES':
    syurp = prompt("Would you like some syrup?","YES or NO").toUpperCase();
    break;

case 'WAFFLES':
    syurp = prompt("Would you like some syrup?","YES or NO").toUpperCase();
    break;

case 'FRENCH TOAST':
    syurp = prompt("Would you like some syrup?","YES or NO").toUpperCase();
    break;

default:
    alert("What?")
    break;
}

It works if I take out the curly bracket for some reason.


#2

Only thing that stands out is the missing semi-colon after alert(), but nothing else looks amiss. The syntax is all correct. The switch requires a code block { ... } which is present.