DEV Community

Discussion on: 10 Interview Questions for Javascript Developer

Collapse
 
mandelbrotman profile image
MandelbrotMan

Thank you Pravin this was very informative. If you don't mind I just want to point out somethings to edit +‘-3’ gives +3 should be -3. Also the object.assign will return a deep copy if you pass an empty object such as {}

Collapse
 
voralagas profile image
Pravin Poudel • Edited

Thanks for that its -3. It's a typo mistake. No!! Object. assign() is shallow copying for an abject with object inside. It won't be able to copy object inside an object rather it copy the reference of an inside object.