- Preparing search index...
- The search index is not available
Tuff
- findIndex<T>(array: T[], callback: ((element: T, index: number, array: T[]) => boolean)): number | null
-
Parameters
-
array: T[]
-
callback: ((element: T, index: number, array: T[]) => boolean)
-
- (element: T, index: number, array: T[]): boolean
-
Parameters
-
element: T
-
index: number
-
array: T[]
Returns boolean
Returns number | null
Finds the index of the first element in an array that satisfies a given callback function.
Returns
the index of the first element that satisfies the callback function, or null if no element satisfies the callback function