deep copy sytax in javaScript code example
Example 1: how to make a deep copy in javascript
JSON.parse(JSON.stringify(o))
Example 2: deep copy javascript
function copy(arr1, arr2) {
for (var i =0; i< arr1.length; i++) {
arr2[i] = arr1[i];
}
}
copy(arr1, arr2)