Lesson no.4 switch


#1



var user = prompt("How are you?").toLowerCase();

switch(user) {
    case 'fine':
        console.log("Okay...");
        break;
    case 'okay':
        console.log("So what happened?");
        break;
    case 'nice':
        console.log("Yep got it!");
        break;
    default:
        console.log("Whatever!");
}


#2

Looks like you edited it just now. Did you found the answer?


#3

Yes I found the solution!