const object = {a: 1, b: 2} const array = [3,4] // Value expression const foo = {...object, c: 3} // == {a: 1, b: 2, c: 3} const bar = [...array, 5, 6] // == [3, 4, 5, 6] // Destructuring assignment { const {a, ...rest} = foo // a == {a: 1}; rest == {b: 2, c: 3} } { const [b, c, ...rest] = bar // b == 3; c == 4; rest == [5, 6] }