You can also use Object.assign() in ES6 (ES2015+).
let obj = {'b': 2, 'c': 3};
const returnedTarget = Object.assign({a: 1}, obj);
// Object {a: 1, b: 2, c: 3}
You can also use Object.assign() in ES6 (ES2015+).
let obj = {'b': 2, 'c': 3};
const returnedTarget = Object.assign({a: 1}, obj);
// Object {a: 1, b: 2, c: 3}