const target = { a: 1, b: 2 };
const source = { b: 4, c: 5 };

const returnedTarget = Object.assign(target, source);
// using object.assign method first object will be simply concatenated to second one
also we can write empty {} brackets and set it empty object as a first argument
by Luka Tatarishvili
4 years ago
JavaScript
Objects tutorial 6
0
Pro tip: use ```triple backticks around text``` to write in code fences