Comparison with the Greater Than Or Equal To Operator
Summary
- The greater than or equal to operator (
>=
) compares the values of two numbers for the larger number.
Final Code
function testGreaterOrEqual(val) {
if (val >= 20) { // Change this line
return "20 or Over";
}
if (val >= 10) { // Change this line
return "10 or Over";
}
return "Less than 10";
}
testGreaterOrEqual(10);