Tell us what’s happening:
hi, can anyone figure out what is wrong with the code.
My results are as follows for the first two steps
testGreaterOrEqual(0)
should return “Less than 10”
testGreaterOrEqual(9)
should return “Less than 10”
Your code so far
function testGreaterOrEqual(val) {
if (val >= 20) { // Change this line
return "20 or Over";
}
if (val >= 10) { // Change this line
return "10 or Over";
}
return "9 or Under";
}
// Change this value to test
testGreaterOrEqual(10);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator