I can’t seem to figure out what I did wrong, my code seems correct, yet I can’t pass the tests
Your code so far
function switchOfStuff(val) {
let answer = "";
// Only change code below this line
switch(val) {
case a: answer = "apple";
break;
case b: answer = "bird";
break;
case c: answer = "cat";
break;
default: stuff
break;
}
// Only change code above this line
return answer;
}
switchOfStuff(a);
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36
Challenge: Basic JavaScript - Adding a Default Option in Switch Statements
Link to the challenge: