Reporting a problem with the lesson: Selecting from Many Options with Switch Statements

Tell us what’s happening:
Whenever i run this thing
It tells me there is an error with case
Changing the code to the correct one doesn’t’work either
and now it refuses to even run the test.

No reply need.

Your code so far

function caseInSwitch(val) {
var answer = "";
// Only change code below this line
case 1:
case 2:
case 3:
case 4:

// Only change code above this line
return answer;


Your browser information:

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

Challenge: Selecting from Many Options with Switch Statements

Link to the challenge:

Changing the browser cleared the issue.

You have to have done something more than clearing your cache. The given code is very incorrect syntax.

Even changing the code onto: freeCodeCamp Challenge Guide: Selecting from Many Options with Switch Statements
would’t help and resolved into the same issue.
I did’t post that because I am not allowed to post the actually answer here.

1 Like

I’m just pointing out that the code provided in your main post cannot even run so that the next person who searches the forum for help on this challenge does not mistakenly believe that the code you wrote is correct syntax.

People should’t go onto this forum looking for answers they should try and sollute it themself.

Conducting research on the forums is encouraged. Research is a critical step in problem solving.

To learn more about how to problem solve, read here: