7. More practice (is that bug?)


#1


Can anyone help me please? :sweat:

Oops, try again. There was a problem with your syntax.


var mySwitch = prompt("Can you rate a difficult of JS lesson? 1-10");

swtich(mySwitch) {
    case 1:
        console.log("Ha! That's was easy!");
    break;
    case 2:
        console.log("That's easy for me!");
    break;
    case 3:
        console.log("Easy!");
    break;
    case 4: 
        console.log("Not too difficult for me.");
    break;
    case 5:
        console.log("Hm... That's not so easy.");
    break;
    case 6:
        console.log("That's normaly for me.");
    break;
    case 7:
        console.log("This is a little bit hard for me.");
    break;
    case 8:
        console.log("That's hard...");
    break;
    case 9:
        console.log("Omg! Realy hard!");
    break;
    case 10: 
        console.log("Super hard for me! :(");
    break;
    default:
        console.log("OVER 9000 HARD FOR ME!!!! OMG!!!!1!");
    break;
}


#2

this bit of code:

swtich(mySwitch)

you misspelled switch, which causes all the errors


#3

ahahahahaha. Thanks
That was so stupid for me :smiley:


#4

Nice over nine thousand reference, and could one of you two help me?
here is my code:

var answer = prompt("What's your favorite Drink?", "Type your favorite drink here");

switch(answer) {
  case "Pop":
    console.log("MMMmmmMMM!");
    break;
  case "Soda":
      console.log("I prefer Pop but Soda is okay too! *wink*");
  break;
  case "Tea":
      console.log("MINE TOO!");
      break;
    case "Water":
        console.log("Refreshing!");
    break;
    case "Juice":
        console.log("Orange, apple or grape?!");
    break;
    case "Coffee":
        console.log("MMM! I like coffee too!");
    break;
    default
    console.log("Hmmm? I'm not sure If I've tried that, But I hope I do soon!");
}

it says:
SyntaxError: Unexpected identifier
and:
Oops, try again. There was a problem with your syntax.


#5

you are missing a colon (:) after default


#6

Thank you sooo! Much, That was so stupid of me, Thanks again!