5/7: Please help with my syntax


#1

var user = prompt("What do you do for fun?").toUpperCase();
switch (user) {
case 0:
switch(user) {
case 0:
if (user === 1) {
console.log("I love R&B music.");
}
else {
console.log("I have other interests.");
}
break;

case 1:
    console.log("I love R&B music.");
    break;

case 2:
    console.log("I love to draw.");
    break;

default:
    console.log("I'll just chill.");

};


#2

it looks like youve got your switch structure a little bit mixed up. in general we should be looking at something like this:

var user = prompt("what do you do for fun?").toUpperCase();

switch(user){
   case "response1":
      console.log("something");
      break;
   case "response2":
      console.log("something else");
      break;
   default:
      console.log("something else");
}

where response1 and response2 are the strings, held in the user variable, that the user enters when they are prompted to do so. switch statements check the value they are given against each of the cases.