Created
June 10, 2018 07:07
-
-
Save abhinavsingi/a2a97133695f333f91b920d6de066b81 to your computer and use it in GitHub Desktop.
Usage of Object.assign
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const obj = {}; | |
for(i=0;i<100000;i++){ | |
obj[i] = 'some long string which will need to be copied'; | |
} | |
const obj2 = {key: 'This is final object'}; | |
const final = Object.assign({}, obj2, obj); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment