asd
arr.copyWithin(target[, start[, end]])
target
자리에start
부터end-1
요소로 덮어씌움.
const array1 = ['a', 'b', 'c', 'd', 'e']; // array1을 복사해서 0번째 자리에 3~(4-1) 인덱스 요소로 덮어씌움. console.log(array1.copyWithin(0, 3, 4)); // expected output: Array ["d", "b", "c", "d", "e"] // array1을 복사해서 1번째 자리에 3~끝 인덱스 요소로 덮어씌움. console.log(array1.copyWithin(1, 3)); // expected output: Array ["d", "d", "e", "d", "e"]