Site under construction! :3
contains(condition: any)
ξ―
Definitionξ―
(method) func array.contains(condition: any) -> bool: return true if element == condition for element in self return false
Returns true
if the array contains at least one element that is equal to the condition, else it returns false
.
Pigeonξ―
> arr = [0, 1, 2, 3, 4] > arr.contains(3) true
Parametersξ―
condition
ξ―
An object.
- Return
true
if any element of the array is equal to the condition.