Help me what is wrong

Tell us what’s happening:

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

testElseIf()
  **Your browser information:**

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

Challenge: Introducing Else If Statements

Link to the challenge:

Hey @eric699 :wave: ,

Next time, when you are asking for help, please give us a description of what exactly you are having a problem with. Try to make a descriptive title.

Anyways, it looks like in your code, your function is not closed.

This function doesn’t have a closing braces }. If you look at all the braces one by one, they all go to an if, else if or else statement. All you need to do is add a closing curly braces } at the end like so:

else {
return "Between 5 and 10";
}
} <-

Hope this helps, Happy coding :slight_smile: !

1 Like

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