Less-than operation
Learn how to check if a value is less than another.
The less than operation checks whether one value is less than another. You can use it to compare numbers, strings, dates, or any other value that has a concept of order.
To compare two values, place the < operator between them:
/*<operand>*/ < /*<operand>*/Here's a practical example involving numbers:
0 < 1 // trueYou can also compare strings alphabetically:
"a" < "b" // trueAnd dates chronologically:
today < tomorrow // trueAlthough there is no natural language equivalent to the < operator, you can use the less than test for a more natural reading:
/*<operand>*/ is less than /*<operand>*/Note that operations and tests may differ in their behavior and precedence. Please refer to the documentation of each specific operation and test for more information.