Lesson 4 the code works but not correct


My code looks like that:

var user = prompt("What's your name?").toUpperCase();
switch(user) {
console.log("The first woman in the world!");
console.log("Very nice name");
console.log("Pretty name");
console.log("Is this name?");

I write "Ewa" and I got an answer "Is this name"? But this is not true. Why? It goes on to the next point but I want that this is correct. Thanks in advance for your help


Here you change the answer to UPPERCASE but later your switch checks for lowercase answers:

So it is receiving 'EWA' and won't run the code.


Thanks for answer but I don't understand...I gave "ToLoweCase" and the asnwer is same. What should I do so the answer will be like in my code?


You made the case 'Ewa' - which is an uppercase E followed by 2 lowercase letters: w, and a. To make the case work, you need to have all of the letters the same case, then check for that version of that word in the case:

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

followed by

case 'EWA':


Thanks a lot! now is all corect!:smile: