8.2.5 배열 안에서 요소 교체하기
copyWithin 메서드
const arr = [1, 2, 3, 4]
arr.copyWithin(1, 2); // [1, 3, 4, 4]
arr.copyWithin(2, 0, 2); // [1, 3, 1, 3]
arr.copyWithin(0, -3, -1); // [3, 1, 1, 3]Last updated
const arr = [1, 2, 3, 4]
arr.copyWithin(1, 2); // [1, 3, 4, 4]
arr.copyWithin(2, 0, 2); // [1, 3, 1, 3]
arr.copyWithin(0, -3, -1); // [3, 1, 1, 3]Last updated