Logical Order in If Else Statements- help

Logical Order in If Else Statements- help
0.0 0

#1

Tell us what’s happening:

what’s wrong in this code?
only two challenges pass
Your code so far

function orderMyLogic(val) {
  if (val > 5 == 10
     ) {
    return "Less than 10";
  } else if (val < 5) {
    return "Less than 5";
  } else {
    return "Greater than or equal to 10";
  }
}

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

Your browser information:

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

Link to the challenge:


#2

Your problem its here if (val > 5 == 10). Can you explain in plain words how the if statement should evaluate the expression between ()?


#3

thanks i fixed it :relieved: