DEV Community

Discussion on: 15 Common JavaScript Questions

Collapse
 
hisoshace profile image
Soshace

About cloning objects, I use json to parse and create another object, but is a good practice?

"If your object is "small" and contains exclusively serializable properties, a simple deepCopy hack using JSON serialization should be OK. But, if your object is large, you could run into problems. And if it contains unserializable properties, those'll go missing:"
stackoverflow.com/questions/206623...