Introducing Else If Statements

Introducing Else If Statements
0

#1

Tell us what’s happening:
I keep getting an error message saying: “SyntaxError: Unexpected end of input”

What does this mean? I’m not sure where I’m going wrong in my code.

Your code so far

function testElseIf(val) {
  if (val > 10) {
    return "Greater than 10";
  }
  
  else if (val < 5) {
    return "Smaller than 5";
  }
  else{
  return "Between 5 and 10";
}

// Change this value to test
testElseIf(7);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36.

Link to the challenge:


#2

You are missing a closing curly bracket “}” for your else code block…