How to Deep clone in javascript

Very simple way, maybe too simple:

var cloned = JSON.parse(JSON.stringify(objectToClone));

Leave a Comment