Contains single element
Syntax
$set.containsElement($element)
Description
Checks whether the set
contains the element
.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
set | Set | A set for which to check if element is included. |
yes | |
element | Number/string/boolean/businss object/set. | An element for which to check whether it is contained in set . |
yes |
Return value
Type: Boolean
true
, if the element is included in the set.
Examples
set contains the element
list(1, 2, 3).containsElement(2)
Output: true
Set does not contain the element
list(1, 2, 3).containsElement(4)
Output: false