Tell us what’s happening:
Hi, I’m having trouble with this test. It keeps giving me an error that says “You should not change the code above or below the specified comments”. How can I fix this?
Your code so far
function testElse(val) {
var result = "";
// Only change code below this line
if (val > 5) {
result = "Bigger than 5";
} else {
result = "5 or Smaller";
}
// Only change code above this line
return result;
}
// Change this value to test
testElse(4);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Introducing Else Statements
Link to the challenge: