Update Array Hack
James DiGioia
const arr = [1, 2, 3];const newArr = Array.from({ ...arr, 1: 3, length: arr.length });console.log(newArr); // [1, 3, 3]
update-array.js
const arr = [1, 2, 3];const newObj = { ...arr };console.log(newObj); // {0: 1, 1: 2, 2: 3}
spread-array.js