Trouble with passing tests for Switch Statement challenge

Trouble with passing tests for Switch Statement challenge
0.0 0

#1

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”;
break;

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


Switch statement problem
#2

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?


#3

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";
  break;
case 2: answer = "beta";
  break;
case 3: answer = "gamma";
  break;
case 4: answer = "delta";
  break;
  // Only change code above this line  
  return answer;  
}

// Change this value to test
caseInSwitch(1);

#4

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.


#5

Thank you for your help!