Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
function testGreaterThan(val) {
if (val >100) { // Change this line
return "Over 100";
}
if (val >10) { // Change this line
return "Over 10";
}
return "10 or Under";
}
testGreaterThan(10);
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36
Challenge: Comparison with the Greater Than Operator
Your code is correct and will pass the tests if you click on “Run the tests”.
Maybe you are confused about why there is return "10 or Under"; under the rest of the code without any conditionals and checks. The reason is that if the code execution reaches this last line of the code, we can be sure that val is equal to or less than 10, otherwise one of the previous conditionals would have turned true and the code had returned early.