js-util

Home > rc-js-util > ATypedArrayTuple > copyWithin

ATypedArrayTuple.copyWithin() method

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

Signature:

copyWithin(_target: number, _start: number, _end?: number): this;

Parameters

Parameter Type Description
_target number If target is negative, it is treated as length+target where length is the length of the array.
_start number If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.
_end number (Optional) If not specified, length of the this object is used as its default value.

Returns:

this