Unexpected identifier


#1

var user = prompt("If you see a Lion chasing after you in the jungle what would you do?");
user.toLowerCase()
switch(user) {
case 'Run'
console.log ("Are you fast enough?")
break;
case 'talk'
console.log("Are you persuasive enough")
break;
case 'faint'
console.log("Are you serious")
break;
default:
console.log("So you die?")
}


#2

var user = prompt("If you see a Lion chasing after you in the jungle what would you do?").toLowerCase()

switch(user) {
case 'Run'
console.log ("Are you fast enough?")
break;
case 'talk'
console.log("Are you persuasive enough")
break;
case 'faint'
console.log("Are you serious")
break;
default:
console.log("So you die?")
}

This still doesnt work

#3

Make this lowercase:

case 'run'

and add a colon on the end:

case 'run':

and it will work.


#4

You forgot to leave colon after case values:

  case value1:
    code;
  break;