Description

Object.assign copies all properties from one object into another

Syntax

let objectA = { a: 1, b: 2 };
Object.assign(objectA, { b: 3, c: 4 });
console.log(objectA);