assign object by value 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 }