Comparison with the Less Than Operator
The less than operator (<) compares the values of two numbers. If the number to the left is less than the number to the right, it returns true. Otherwise, it returns false. Like the equality operator, the less than operator converts data types while comparing.
Examples
2 < 5 // true
'3' < 7 // true
5 < 5 // false
3 < 2 // false
'8' < 4 // false
Add the less than operator to the indicated lines so that the return statements make sense.
Tests
- Waiting: 1.
testLessThan(0)should return the stringUnder 25 - Waiting: 2.
testLessThan(24)should return the stringUnder 25 - Waiting: 3.
testLessThan(25)should return the stringUnder 55 - Waiting: 4.
testLessThan(54)should return the stringUnder 55 - Waiting: 5.
testLessThan(55)should return the string55 or Over - Waiting: 6.
testLessThan(99)should return the string55 or Over - Waiting: 7. You should use the
<operator at least twice
/** * Your test output will go here */