Greater-than operation
Learn how to check if a value is greater than another.
The greater than operation checks whether one value is greater 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:
1 > 0 // trueYou can also compare strings alphabetically:
"b" > "a" // trueAnd dates chronologically:
tomorrow > today // trueAlthough there is no natural language equivalent to the > operator, you can use the greater than test for a more natural reading:
/*<operand>*/ is greater 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.