function slice(array) {
  var newArray = new Array(array.length);
  var i, l;

  for (i = 0, l = array.length; i < l; i++) {
    newArray[i] = array[i];
  }

  return newArray;
}
Efficient slice function used to clone arrays or parts of them.

@param  {array} array - The array to slice.
@return {array}       - The sliced array.