js-util

Home > rc-js-util > ATypedArrayTuple > forEach

ATypedArrayTuple.forEach() method

Performs the specified action for each element in an array.

Signature:

forEach(_callbackfn: (value: number, index: number, array: this) => void, _thisArg?: unknown): void;

Parameters

Parameter Type Description
_callbackfn (value: number, index: number, array: this) => void A function that accepts up to three arguments. forEach calls the _callbackfn function one time for each element in the array.
_thisArg unknown (Optional) An object to which the this keyword can refer in the _callbackfn function. If _thisArg is omitted, undefined is used as the this value.

Returns:

void