Always generates DEFAULT!


#1


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


Hi guys,

I've got an issue with this code! I can actually pass the lesson because it generates the DEFAULT, but it always does that even when I insert KOBA, DEBORAH or FREDERICA...

What is wrong with it?


var user = prompt ("What's your name?").toLowerCase();

switch(user) {
    case'KOBA':
        console.log("haha communist or monkey?");
        break;
    case'DEBORAH':
        console.log("Nice name!");
        break;
    case'FREDERICA':
        console.log("My daughters name! Good choice!");
        break;
    default:
        console.log("I don't know you!");
}


#2

you convert the user input to lowercase, and then your cases are uppercase, so the default will be generated


#3

Great it works now! Thanks a lot!


#4