4. Switch

var user = prompt (“Are you ready?”).toLowerCase();

switch(user) {
case ‘Yes’:
console.log(“Let’s do it”);
case ‘No’
console.log(“Come back when you will be ready”);
case ‘Absolutely’:
console.log(“This waht I want to hear all the time”);
console.log(“I don’t know you”);

Help me please. I don’t know what is wrong. I’m keep getting “There is a problem with your syntax”

On your second case you forgot the “:”. Add it and try again.

Omg. such a stupid mistake. Thank you it worked

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