What is the output of this code? const obj1 = { a: 0, b: 2, c: 4 }; const obj2 = Object.assign({c: 5, d: 6}, obj1); console.log(obj2.c, obj2.d); code example
Example: javascript assign
const obj = { a: 1 };
const copy = Object.assign({}, obj);
console.log(copy); // { a: 1 }