Lesson 5 I don't know how to begin and have no idea


Hi all,

first happy new year 2016:)

I'm stuck on lesson 5, where I have to add some if/else statement to my code.

My code look like that:

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

What can I add to this? and where? I really don't know but I don't want to change this all....Please help me..

Thanks for any reply!:smile:


I know this reply is late, but maybe you can get help from this in your further lessons.
You can add a new variable, under each case's action, that holds an answer for a prompt code.
Maybe you can add
var a = prompt("What do you think about my answer to your name?","GOOD,BAD").toUpperCase();
if (a==='GOOD'){
console.log("Anything you want");
console.log("Anything you want");
between the case of 'EWA' and 'MARTA'.
You can use the same syntax for other names, too.
I wish my reply helped you.
If something doesn't work, tell me, and I'll try to help you.


Wow, I hope Ewa was helped by this too, because you're response here to her gave me a real hint that led me to solve his one - just as a tutor has explained to me for math - sometimes just adding something in from out of nowhere is fine and lets you balance the equation (or code!), thank you!



Hi! thanks a lot for your replies. It helped me and I already done the whole course! Thanks one more time for your helps