javascript create array from another just a value code example
Example: javascript copy array
var oldColors=["red","green","blue"];
var newColors = oldColors.slice(); //make a clone/copy of oldColors
var oldColors=["red","green","blue"];
var newColors = oldColors.slice(); //make a clone/copy of oldColors