Basic JavaScript - Introducing Else If Statements

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

Your code so far

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

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

Your browser information:

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

Challenge: Basic JavaScript - Introducing Else If Statements

Link to the challenge:

hi there, did you have a question?

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