assign this to that javascript code example
Example: javascript assign
const obj = { a: 1 };
const copy = Object.assign({}, obj);
console.log(copy); // { a: 1 }
const obj = { a: 1 };
const copy = Object.assign({}, obj);
console.log(copy); // { a: 1 }