5/6 ReferenceError: Can't find variable:


#1

I don't know what to do. I get ReferenceError: Can't find variable: SALLY

var user = prompt("What's your name?").toUpperCase()
switch(user) {
    case 'SALLY':
        console.log("Nice name!");
        break;
    case 'BOB':
        console.log("Screw you Bob.");
        break;
    case 'AMANDA':
        console.log("Thank God!");
        break;
    default:
    console.log("I don't care.");
        if(SALLY && BOB) {
            console.log("Okay.");
        }


 else if(SALLY || BOB) {
        console.log("Sure.");
        }
        else {
            console.log("Eh.");
        }
};

#2

if(SALLY && BOB)
in this condition SALLY and BOB are variables, but you never defined these variables. That's why you get that error message.

Correct condition:

if( user === "SALLY" || user === "BOB")

Here "BOB" and "SALLY" are strings, not variables