Switch case last exercise


#1

var anything = prompt("type anything refer to that case");
switch(anything){
case 'one':
console.log("case one");
break;
case 'two':
console.log("case two");
break;
case 'three':
console.log("case three");
break;
default:
console.log("another new case !");
break;
}

what did i do wrong? cause, it's telling me "Oops, try again : Make sure you have a break statement for each case !"


#2

you don't need break statement after default!

default:
console.log("another new case !");
break; <= remove this
}

@maiindonesia


#3

thank you :grinning: