Considering following code:
var obj1 = Object.create({}, {myProp: {value: 1}}); var obj2 = Object.assign({}, {myProp: 1});
Is there any dif
Object.assign() provides shallow copying (Only properties and methods) and it will override the method and property declared.
Object.assign()
while Object.create() provides Deep copying provides prototype chain.
Object.create()