- each<I, Context>(arr, cb, context?): void
Type Parameters
I extends any[] | readonly any[] | Dictionary<any> | ArrayLike<any>
Context
Parameters
arr: I
cb: ((this, value, index?, arr?) => void)
- (this, value, index?, arr?): void
Parameters
value: I extends ArrayLike<T> | T[] | readonly T[]
? T
: I extends Dictionary<any>
? I extends Record<K, T>
? T
: unknown
: unknown
Optional
index: I extends any[] | readonly any[] | ArrayLike<any>
? number
: keyof I & string
Optional
arr: I
Returns void
Optional
context: Context
Returns void
数组或对象遍历