1.搞清楚什么是arguments“arguments 是一个对应于传递给函数的参数的类数组对象。arguments对象是所有(非箭头)函数中都可用的局部变量。你可以使用arguments对象在函数中引用函数的参数。此对象包含传递给函数的每个参数,第一个参数在索引0处。”首先它是一个类数组对象,typeof arguments结果毫无疑问是"object",注意结果是字符串类型。接下来调用Object.prototype.toString.call(arguments),结果是从未见过的"[object Arguments]"。2.转换为数组1.Array的silce方法Array.prototype.slice.call(arguments)2.Array.fromlet re = Array.from(arguments)3.拓展运算符let re = […arguments]3.从arguments到类数组类数组必须有length属性,具有索引属性,下面结合代码说明:let obj = { “0”: ‘a’, “1”: ‘b’, “2”: ‘c’, length: 3, “push”: Array.prototype.push, “splice”: Array.prototype.splice }obj.push(’d’)console.log(obj) 结果为:实际执行过程相当于:obj[obj.length] = ’d’;obj.length++;4.笔试题var length = 10;function fn(){ console.log(this.length)}var obj = { length: 5, getF: function(fn) { fn(); arguments0; }}obj.getF(fn);考察的是arguments和this指向问题,我答的5 1,真实结果为10 1。第一次写文章,希望对你们有点帮助。