@tempots/std
anyElement() function
Checks if any element in the array satisfies the given predicate.
Signature:
anyElement: (arr: T[], predicate: (v: T) => boolean) => boolean
Parameters
Parameter |
Type |
Description |
---|---|---|
arr |
T[] |
The array to check. |
predicate |
(v: T) => boolean |
The predicate function to apply to each element. |
Returns: boolean
true
if any element satisfies the predicate, false
otherwise.