Comparison with the Greater Than Or Equal To Operator

Comparison with the Greater Than Or Equal To Operator
0

#1

Tell us what’s happening:

Your code so far

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

  return "9 or Under";
}

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

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36.

Link to the challenge:


#2

There are hints on the code :wink:. What have you tried so far?


#3

Your conditions are wrong. The first one should return "20 or Over" when your val is 20 or higher and your second condition should return "10 or Over" when val is 10 or higher.


#4

ok thanks I solved the problem :slight_smile: