In order to duplicate an array in JavaScript: which of the following is faster to use?
###Slice method
var dup_array = original_array.slice(); <
var dup_array = original_array.slice();
Technically slice is the fastest way. However, it is even faster if you add the 0 begin index.
slice
0
myArray.slice(0);
is faster than
myArray.slice();
http://jsperf.com/cloning-arrays/3