Tell us what’s happening:
Describe your issue in detail here.
Your code so far
function caseInSwitch(val) {
let answer = "";
// Only change code below this line
caseInSwitch(1)(val){
case "alpha":
console.log("The val is alpha");
break;
case "beta":
console.log("The val is beta");
break;
case "gamma":
console.log("The val is gamma");
break;
case "delta":
console.log("The val is delta")
break;
}
// Only change code above this line
return answer;
}
caseInSwitch(1);
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 6.0; BGO-DL09) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 Mobile Safari/537.36
Challenge: Basic JavaScript - Selecting from Many Options with Switch Statements
function caseInSwitch(val) {
let answer = "";
// Only change code below this line
caseInSwitch(1) (val) {
case "alpha":
console.log("The val is alpha");
break;
case "beta":
console.log("The val is beta");
break;
case "gamma":
console.log("The val is gamma");
break;
case "delta":
console.log("The val is delta");
break;
}
// Only change code above this line
return answer;
}
I don’t understand what this piece is. It doesn’t look like the example.
The challenge doesn’t want you use use console.log. You need to change the value of answer.
The cases are the values val is matching, which are 1, 2, 3, or 4.