Site under construction! :3

contains(condition: any) ξ―‚

1.0.0 Boolean

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ξ―‚

1.0.0 Any Optional

An object.

Return true if any element of the array is equal to the condition.