js does slice copy all internal data by 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