$set.lastElement()
$set[$set.size() - 1]
Returns the last element of the set.
| Name | Type | Description | Mandatory | Default |
|---|---|---|---|---|
| set | Set | A set from which the last element should be returned. | yes |
Type: number/string/boolean/businss object/set
The last element from set or null, if the set is empty.
list("hello", "how", "are", "you").lastElement()
Output: you
list().lastElement()
Output: null