7
Object spreading is just syntactic sugar for Object.assign({}, obj1, ..., objn);
It is done with the ... operator:
let obj = { a: 1 };
let obj2 = { ...obj, b: 2, c: 3 };
console.log(obj2); // { a: 1, b: 2, c: 3 };
As Object.assign it does shallow merging, not deep merging.
let obj3 = ...