Appending to this, you may swallow copy stuff with myArray.slice(0) or just myArray.slice() while a deep copy looks more like this:
var foo = JSON.parse(JSON.stringify(bar));
This trick in C# is more or less the same hack.
No comments:
Post a Comment