function orderMyLogic(val) {
if (val < 5) {
return "Less than 10";
} else if (val < 10) {
return "Less than 5";
} else {
return "Greater than or equal to 10";
}
}
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";
}
}
// Change this value to test
orderMyLogic(7);```
**Your browser information:**
Your Browser User Agent is: ```Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0```.
**Link to the challenge:**
https://www.freecodecamp.org/challenges/logical-order-in-if-else-statements
<p>
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";
}
}
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";
}
}
// Change this value to test
orderMyLogic(5);
orderMyLogic(7);
requirements
orderMyLogic(4) should return "Less than 5"
orderMyLogic(6) should return "Less than 10"
orderMyLogic(11) should return "Greater than or equal to 10"
</p>