what is wrong in this code?

Tell us what’s happening:

  **Your code so far**

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

function orderMyLogic(7);


  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36.

Challenge: Logical Order in If Else Statements

Link to the challenge:

1 Like

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

The more information you give us, the more likely we are to be able to help.

1 Like

I am stuck here. I am not able to understand, what I did wrong. I am not able to move forward in this challenge.

1 Like

Try reading the challenge text again, carefully. Take note of the information about the order.

1 Like

I’m not sure why you added the function keyword here.

Also, it doesn’t look like you reordered the if clauses. This challenge asked you to reorder the if clauses.

1 Like

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