JS. How to make clone of array?

var firstArray : Array = new Array(0,1,2,3,4,5);
var secondArray : Array;

secondArray = firstArray;

Creates an additional reference to the array.

var firstArray : Array = new Array(0,1,2,3,4,5);
var secondArray : Array;

System.Array.Copy(firstArray, secondArray, firstArray.length);

No appropriate version of ‘System.Array.Copy’ for the argument list ‘(Array, Array, int)’ was found.

How to use System.Array? Where can I read about it? How to clone array?

Looks like this would work, although I have never used it: Array.slice

http://www.w3schools.com/jsref/jsref_slice_array.asp

var secondArray : Array = firstArray.slice (0, firstArray.length);

Try that. I should note unityAnswers is crammed full of questions with responses yelling at them to use Lists in java script instead of Array.