Comparison with the Greater Than Or Equal To Operator help me!

Comparison with the Greater Than Or Equal To Operator help me!
0

#1

Tell us what’s happening:

is there anything i miss?

Your code so far

function testGreaterOrEqual(val) {
  if (val>=100) {  // Change this line
    return "20 or Over";
  }
  
  if (val) {  // Change this line
    return "10 or Over";
  }

  return "9 or Under";
}

// Change this value to test
testGreaterOrEqual(10);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36.

Link to the challenge:


#2

The comparison you have to make in the if-blocks are hinted to by the return values. How will you write the first condition such that the function will return '20 or Over'?


#3

You are checking for greater than or equal to 100, not 20. Your second if isn’t comparing val to anything.