我的理解是我可以调用Array.prototype.slice.call(arguments, 1)返回数组的尾部.
Array.prototype.slice.call(arguments, 1)
为什么这段代码不会返回[2,3,4,5]?
[2,3,4,5]
function foo() { return Array.prototype.slice.call(arguments,1); } alert(foo([1,2,3,4,5]));
javascript
javascript ×1