spreadbeginnerconst arr = [1, 2, 3]
const copy = [...arr]
console.log(copy) // β [1, 2, 3]
const merged = [...[1, 2], ...[3, 4]]
console.log(merged) // β [1, 2, 3, 4]The spread operator uses the iterator protocol to expand an iterable into individual elements.
Check spread with set.