Syntax error: unexpected identifier please help


console.log("you at the gates of hell");
var user = prompt ("do you wish to continue?") .toUpperCase();
     case 'yes':
        console.log("you venture into the depths of hell");
              prompt ("go further or go back?");
              var yes = true;
              var  ok = true;
              if (yes || ok) {
             console.log("uh oh... you run face to face with a demon!");
              console.log("go forward you lilly livered nimwit!");
    case 'no' 
             console.log("really? you wimp.");
              prompt ("do you wish to reconsider?");
             var no = false;
             var maybe = false;
                 if(no && maybe){
                 console.log("you officially suck");
                 console.log("Atta boy!");
    case 'maybe': 
             console.log("hurry up and pick nigga!");
            console.log(user + " is not a viable option, please pick one  of the options listed.");


Hi try To remove The toUpperCase(toUpperCase())

var user = prompt ("do you wish to continue?") .toUpperCase


I tried that and it didnt work


 case 'no'  // here you missed :
var user = prompt ("do you wish to continue?") .toUpperCase();  // here you did upper case the value of user

but for switch case see

case 'yes': // lower case

make sense :slight_smile:


thank you so much it was just the : after no that i was missing


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.