Home > rc-js-util > ATypedArrayTuple > map
Calls a defined callback function on each element of an array, and returns an array that contains the results.
Signature:
map(_callbackfn: (value: number, index: TExtractIndexes<this>, array: this) => number, _thisArg?: unknown): this;
Parameter | Type | Description |
---|---|---|
_callbackfn | (value: number, index: TExtractIndexes<this>, array: this) => number | A function that accepts up to three arguments. The map method 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:
this