array javascript clone code example
Example 1: js clone array
var clone = myArray.slice(0);
Example 2: js copy array into another
var destinationArray = Array.from(sourceArray);
var clone = myArray.slice(0);
var destinationArray = Array.from(sourceArray);