copyWithin()
Example
const arr: number[] = [ 1, 2, 3, 4, 5 ];
arr.copyWithin( 2, 0, 2 );
console.log( arr ); // Output: [1, 2, 1, 2, 5]Last updated
const arr: number[] = [ 1, 2, 3, 4, 5 ];
arr.copyWithin( 2, 0, 2 );
console.log( arr ); // Output: [1, 2, 1, 2, 5]Last updated