(function(){ return typeof arguments;
})()
答案请往下翻
//"object"arguments是一个Array-like对象,对应的就是传入函数的参数列表。你可以在任何函数中直接使用该变量。
typeof操作符只会返回string类型的结果。参照如下列表可知对应不同数据,typeof返回的值都是什么:
| 类型 | 结果 |
|---|---|
undefined | 'undefined' |
null | 'object' |
Boolean | 'boolean' |
Number | 'number' |
String | 'string' |
| Symbol (new in ECMAScript 2015) | 'symbol' |
| Host object (provided by the JS environment) | Implementation-dependent |
| Function object (implements [[Call]] in ECMA-262 terms) | 'function' |
| Any other object | 'object' |
由此我们推断出,
typeof arguments是object
解析arguments对象与typeof用法
1万+

被折叠的 条评论
为什么被折叠?



