Answer not approved even though it correct

Tell us what’s happening:
Describe your issue in detail here.

The interface is not approving my answer even though it is exactly equal to the official answer in the forum and in the video. I even tried copying and pasting the same exact answer from the forum, you’ll find the code below:

  **Your code so far**

switch (val) {
case 1:
answer = “alpha”;
break;
case 2:
answer = “beta”;
break;
case 3:
answer = “gamma”;
break;
case 4:
answer = “delta”;
break;
}


function caseInSwitch(val) {
let answer = "";
// Only change code below this line
switch (val) {
  case 1:
    answer = "alpha";
    break;
  case 2:
    answer = "beta";
    break;
  case 3:
    answer = "gamma";
    break;
  case 4:
    answer = "delta";
    break;
}
// Only change code above this line
return answer;
}
}

caseInSwitch(2);
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36

Challenge: Selecting from Many Options with Switch Statements

Link to the challenge:

It looks like you have mismatched {}s. That sort of thing happens when you try copy-pasting somebody else’s answer.

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