— 1. Spread operator It’s a handy tool to get the contents out of an array or object. For example you can use it like below to copy an array: const array = [1, 2, 3]
const copy = [...array];
console.log(copy) // [1, 2, 3] However note that it is a shallow copy…