Switch Problem


Please help with my code! I already checked that there is an upper case alignment, semicolons etc. but it keeps telling me "SyntaxError: Unexpected token ILLEGAL". Thank you!

var user = prompt ("Will you go left, right, or straight?").toUpperCase();

switch (user) {
case 'LEFT':
console.log("Left is never right...");
case 'RIGHT':
console.log("I think you're right!");
case 'STRAIGHT":
console.log("Straight is only for scaredy-cats.");
console.log("There's no way you can go there!");


A string should either be encapsulated in
a pair of single-quotes-' '
a pair of double-quotes-" "

So change your case-clause


in you switch statement.


aaah how could I have missed that. Thanks so much!



But keep in mind.....
SyntaxError: Unexpected token ILLEGAL".
the token being
the case-clause......