Greater than
Syntax
$e1 > $e2
$e1.gt($e2)
Description
Boolean expression that evaluates to true
if the result of evaluating e1
is greater than the result of evaluating e2
. See isGreater for alternative functions.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
e1 | Number/string/set | Object to be compared with e2 . |
yes | |
e2 | Number/string/set | Object to be compared with e1 . |
yes |
Return value
Type: Boolean
true
, if the result of the evaluation says that e1
is greater than e2
.
Examples
Numbers
2 > 1
Output: true
Unequal sets
list(1, 2, 4).gt(list(1, 2, 3))
Output: true
Since sets are compared element by element, the first set is greater than the second because the number 4 is greater than the number 3 (see Comparison operators).
Equal sets
list(1, 2, 3).gt(list(1, 2, 3))
Output: false
The sets are equal in size.