Trying and can't get it

Gone over it way too many times and can "t get it to pass. Please help. Thank you in advance.
gg

  **Your code so far**
function switchOfStuff(val) {
let answer = "";

switch(val){
case "a":
answer = "apple"
break;
case "b"
answer = "bird"
break;
case "c"
answer = "cat"
break;


} 
return answer;
}

console.log(switchOfStuff("c"));
  **Your browser information:**

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

Challenge: Adding a Default Option in Switch Statements

Link to the challenge:

Compare the ends of your case clauses

case "a":
case "b"

You also need cases for d and 4 and the default

Firstly my friend you haven’t mentioned colons : after the case “b” and case “c” and also you need to write a default case which will run when none of the above cases are true. default case syntax is similar to above cases in place of case “a/b/c” you need to write default and give answer a value of stuff. Try solving it as I explained it and try to comprehend whats being asked and if still you are not able to get the solution then here it is : -

Mod Edit: SOLUTION REDACTED

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

1 Like

Okk I will insure this in my future answers.