Basic JavaScript - Introducing Else Statements

Tell us what’s happening:
Describe your issue in detail here.

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


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Introducing Else Statements

Link to the challenge:

Your code isn’t passing the challenge because you are probably getting the following error message:

You should not change the code above or below the specified comments.

The code has been altered outside of the specified area.
Did you paste this solution in from elsewhere?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.