Checks if predicate returns truthy for any element of array. Iteration is stopped once predicate returns truthy. The predicate is invoked with three arguments: (value, index, array).
predicate
array
The array to iterate over.
The function invoked per iteration.
Returns true if any element passes the predicate check, else false.
true
false
5.0.0
some([null, 0, 'yes', false], Boolean)// => true Copy
some([null, 0, 'yes', false], Boolean)// => true
Checks if
predicate
returns truthy for any element ofarray
. Iteration is stopped oncepredicate
returns truthy. The predicate is invoked with three arguments: (value, index, array).