Tell us what’s happening:
Basic JavaScript: Introducing Else Statements has a problem. When I try to run the test, the test doesn’t run. This also happens with comparisons with logical and operator the first one. Please fix these issues as soon as possible.
Your code so far
function testElse(val) {
var result = "";
// Only change code below this line
if (val > 5) {
result = "Bigger than 5";
} else { (val <= 5) {
result = "5 or Smaller";
}
// Only change code above this line
return result;
}
testElse(4);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36.
Challenge: Introducing Else Statements
Link to the challenge: