Tests Not Running

I’ve recently run into an issue where my tests are not running in any of the Java, beginning with the Selecting from Many Options with Switch Statements.

I am aware that the code sometimes won’t run if there are any errors in the reply. My answer is as follows:


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(3);

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

markdown_Forums

Thank you
for the advice :)