function a(){ console.log(arguments.length);
var c = [].slice.call(arguments);//类数组转成数组
c.push(5);
console.log(c);
console.log(arguments);
} a(1,2,3)
var a = [1,2,3], b = a.slice(0); a.push(5); console.log(a);
console.log(b);
2024-01-19 14:00:46
function a(){ console.log(arguments.length);
var c = [].slice.call(arguments);//类数组转成数组
c.push(5);
console.log(c);
console.log(arguments);
} a(1,2,3)
var a = [1,2,3], b = a.slice(0); a.push(5); console.log(a);
console.log(b);