Skip to main content

each<Q, T>(arr: Q, callback?: ArrayCBT<T>, thisArg?: unknown): void

A more-or-less spec-compliant Array forEach.

remarks

This implementation loops in reverse order.

see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map

Type parameters:#

NameTypeDefaultDescription
Qunknownunknown[]The type of the array-like being provided.
T-Q[keyof Q]The type of elements in the array-like being provided.

Parameters:#

NameTypeDescription
arrQThe input array-like to loop through.
callbackArrayCBT<T>The callback provided. This iteratee is invoked with three arguments: value, index|key, and arr.
thisArgunknownThe value to use as this when executing callback.

Returns: void

void

Defined in: safe/array/each.ts:23

Last updated on