4 * Create slice of source array or array-like object
6 function slice(arr, start, end){
11 } else if (start < 0) {
12 start = Math.max(len + start, 0);
14 start = Math.min(start, len);
20 end = Math.max(len + end, 0);
22 end = Math.min(end, len);
27 result.push(arr[start++]);