Logical Order in If Else Statements solution here

Tell us what’s happening:

Your code so far


solution:

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

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

**Your browser information:**

User Agent is: <code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36</code>.

**Link to the challenge:**
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/logical-order-in-if-else-statements

Your code is correct, the difference I noticed your code wasn’t able to run because the quotations are not read properly.

Capture

1 Like

ok. it seems like I put the code in the text editor for and paste it back, it is now working for me thank