loading...

re: What's the best way to deeply clone an object in JavaScript? VIEW POST

FULL DISCUSSION
 
const deeplyCloned = object.assign({}, myObj)
 

The method Object.assign() is not a "full" deep clone, works only at the first level. Example here. Maybe recursive Object.assign() does the job.

 

cloning nested object is like diving into a black hole

code of conduct - report abuse