Switch


#1


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


i think my code looks right but it says "Oops, try again. There was a problem with your syntax.".
please help


var user = prompt("Are you going to FIGHT, RUN,HIDE").toUpperCase();

switch(user) {
    case 'FIGHT':
        console.log("So your up to the fight!");
        break;
    case 'RUN':
        console.log("bye bye you fat scardy cat.");
        break;
    case 'Steve':
        console.log("HIDE");
        break;
    default:
        console.log("you can hide but you can't run!!!!!!!!!!!!!!!!!!!!!!!!");


#2

Hi you didn't close the switch statement

switch(user) {
   ...
}

#3

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