- any<T>(array: T[], fn??: ((value: T, index: number, array: T[]) => boolean)): boolean
-
Parameters
-
array: T[]
-
Optional
fn: ((value: T, index: number, array: T[]) => boolean) = Boolean
-
- (value: T, index: number, array: T[]): boolean
-
Parameters
-
value: T
-
index: number
-
array: T[]
Returns boolean
Returns boolean
Returns
true
if the provided predicate function returnstrue
for at least one element in a collection,false
otherwiseExample
Example