×
×
Correct!

Add a section that will alert("Neither") if fruits is neither "banana" nor "apple".

switch(fruits) { case "Banana": alert("Hello") break; case "Apple": alert("Welcome") break; default: alert("Neither"); }

Not Correct

Click here to try again.

Correct!

switch(fruits) {
  case "Banana":
    alert("Hello")
    break;
  case "Apple":
    alert("Welcome")
    break;
  
    alert("Neither");
}

  
  
  




×

Reset the Score?

This will reset the score of ALL 67 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 67 JS exercises.

Share your score:



Get Certified!

Take our JavaScript Developer Certificate to prove that you have fundamental knowledge of web development using JavaScript.