clone

clone() -> newArray

Returns a duplicate of the array, leaving the original array intact.

Example


  var fruits = ['Apples', 'Oranges'];
  var myFavs = fruits.clone();
  myFavs.pop();
  // fruits -> ['Apples', 'Oranges']
  // myFavs -> ['Apples']