3 ms·
This doesn't seem to copy methods on an object. Why is this better than using JSON.stringify(OBJ) and JSON.parse(OBJ) to deep clone?
by gitgud 8y ago
This doesn't seem to copy methods on an object. Why is this better than using JSON.stringify(OBJ) and JSON.parse(OBJ) to deep clone?
- jfet97 8y agoLot of stuff, as you can see in the docs. JSON.parse/stringify does not call the constructors for example