Site under construction! :3
any(func: function = (el => el))
ξ―
Definitionξ―
(method) func array.any(func: function = (el => el)) -> bool: for element in self: return true if func(element) return false
Returns true
if any element of the array returns true
given a specified function
, else it returns false
.
Pigeonξ―
> arr = [0, 1, 2, 3, 4] > arr.any(el => el > 3) true
Parametersξ―
func
ξ―
A function
object.
- If no function is declared, it defaults to checking if items are truthy.