这将是类似数组的对象,但为什么我们无法使用点符号而不是括号表示法访问它?使用点符号访问数组或类似数组的对象的元素
function testArray (rat){
return typeof arguments;
}
console.log(testArray("test")); // object
function testArray (rat){
return arguments.0; //[0] is work
}
console.log(testArray("test")); // error
['arguments arguments'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments)is _“an **类似于数组的对象**对应于参数传递给一个函数。“_并且,不,你不能通过点符号访问n-index属性。 – canon