Trouble with passing tests for Switch Statement challenge

I’m looking for help. I’ve written the code for this example as instructed. My final statements was written as follows:

case 4: answer = “delta”;

But when I press ‘Run the Tests’, nothing happens. Am I missing something?

I moved your post to a new topic, because you were not answering a question posed by the original topic and you need help with your own code.

Can you please post all of the challenge code, so we can take a look at your logic?

When I pres Run the Tests nothing happens and I am unable to progress further. Is it my code?

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

// Change this value to test

You are not using the Switch statement. Review the example code of the challenge. All you have is case statements without the initial Switch statement.

1 Like

Thank you for your help!