Compare with the Greater Than Or Equal To Operator

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

The problem here isn’t in the code logic. Its in what needs to be returned to fulfill the challenge requirements.

It says here that you should return “Less than 10”.

But you are returning “9 or Under”:

So you just have to change the returned string and you’ll pass the challenge.

Oh yes… I did it think of it literally. Thanks a bunch