Weird Syntax Error in switch statements - Am I missing something?

Am I missing something here? I’m getting a syntax error in the first case on the first quote when I’m trying to declare switch statements. (6:13)

I’ve looked at all the guides and my code appears to be identical to everything I’m seeing online.

  **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:
  answer = “stuff”;
  break;
}

// Only change code above this line
return answer;
}

switchOfStuff("a");
  **Your browser information:**

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

Challenge: Adding a Default Option in Switch Statements

Link to the challenge:

These aren’t regular quotation marks. I would guess that you are using an Apple device and Apple is “helpfully” swapping your regular quotes for “smart quotes”. Swap all of the quotation marks to ".

Thank you. This was racking my brain for at least 45 minutes

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