let obj1 = {'a':'1'}; | |
let obj2 = Object.assign({}, obj1); | |
obj1.b = '2'; | |
console.log(obj2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
let obj1 = {'a':'1'}; | |
let obj2 = Object.assign({}, obj1); | |
obj1.b = '2'; | |
console.log(obj2); |