Tell us what’s happening:
For the switch challenge I wrote the code bellow. It passes when I test it on my console bud doesn’t passes when I run the tests on the website. I cant see where is my mistake.
Your code so far
function caseInSwitch(val) {
var answer = "";
// Only change code below this line
switch(val) {
case 1:
console.log("alpha");
break;
case 2:
console.log("beta");
break;
case 3:
console.log("gamma");
break;
case 4:
console.log("delta");
break;
}
// Only change code above this line
return answer;
}
caseInSwitch();
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
.
Challenge: Selecting from Many Options with Switch Statements
Link to the challenge: