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();
Remember .slice() won't work for two-dimensional arrays. You'll need a function like this:
function copy(array) { return array.map(function(arr) { return arr.slice(); }); }