Tests Not Running

Tests Not Running
0.0 0

#1

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

#2

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.


#3

Thank you
for the advice :)