4. Switch


#1



https://www.codecademy.com/courses/javascript-beginner-en-ZA2rb/0/4?curriculum_id=506324b3a7dffd00020bf661


There was a problem with your syntax.


Replace this line with your code. 
var user = prompt("You are walking down a dark trail and suddenly you hear footsteps behind you. Do you walk FASTER, RUN, or TURN around to see what is behind you?").toUpperCase();
switch(user)
{
    case'FASTER'
        console.log("You begin to walk faster, but the footsteps behind you also start to speed up.")
        break;
    case'RUN'
        console.log("You run until you are tired, and 4 minutes later are in a large clearing within sight of your car")
        break;
    case'TURN'
        console.log("You turn to see your friend coming up behind you, she decided to come on the walk with you.")
        break;
    default:
    console.log("I didn't understand your choice. Hit Run and try again, this time picking FASTER, RUN, or TURN");
}


#2

Hello :slight_smile:

You have to add a colon after every case statement, for example:

case 'FASTER':

#3

I knew it was probably something simple.

Thanks


#4

You're very welcome!