isGreater
Syntax
$e1.isGreater($e2)
Description
Boolean expression that evaluates to true
if the result of evaluating e1
is greater than the result of evaluating e2
. See Greater than 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.isGreater(1)
Output: true
Unequal sets
list(1, 2, 4).isGreater(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).isGreater(list(1, 2, 3))
Output: false
The sets are equal in size.