6. Practice with switch | What am I supposed to do?


Hi, I keep getting the error this error... | Oops, try again. Did you remember to put in your default block?

What am I supposed to do here, I am very confused and would like a detailed answer so I can learn and find out what to do next time.


var candy = prompt("What's your favorite candy?","Type your favorite candy here.");

switch(candy) {
  case 'licorice':
  case 'gum':
    console.log("I like gum!");
  case 'beets':
    console.log("...is that even a candy?");
  // Add your code here!
    console.log("I don't know that candy!");


In this line
Misppelling there!


Spelling is important. It should default.


Thanks, I'm such an idiot...


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.