Sep 7, 2018 · 1 min read
The problem with these approaches is it will only work for objects with primitive properties.if an object has a reference to another object, this will fail.you change the referred object in clone, it will change in the original