const target = { a: 1, b: 2 }; const source = { b: 4, c: 5 }; const result = Object.assign(target, source); console.log(target); // Output: { a: 1, b: 4, c: 5 } console.log(result); // Output: { a: 1, b: 4, c: 5 }In this example, the values of `source` object are copied to the `target` object using Object.assign(). Package library: There is no need for a package library as Object.assign() is a built-in method in JavaScript.