// Andrea Giammarchi, WTFPL function slice() {'use strict'; for (var o = +this, // offset i = o, // start index l = arguments.length, // length n = l - o, // new length a = Array(n < 0 ? 0 : n); // new Array i < l; i++ ) a[i - o] = arguments[i]; return a; } /** * @example (function () { slice.apply(0, arguments); // [1,2,3] slice.apply(1, arguments); // [2,3] slice.apply(6, arguments); // [] }(1,2,3)); */