console.log(typeof typeof a);
打印为 string
解释:typeof a 输出的是undefined,虽然undefined表达的是未定义的元素,但对于‘undefind’这个元素本身来说,‘undefined’是字符串,所以整个语句可以看出console.log(typeof 'undefined');输出的就是string。
//typeof 是个函数 他的返回值 就是string类型 所以 a
var a=typeof b
b未定义-------- undefined
a 此时的值: string ------"undefined"
typeof a 就等同于 typeof "undefined" 返回字符串类型 的" string"
"string"
console.log(typeof typeof a);
从右边往左边计算 typeof a的返回值 给 左边的typeof 当做参数 去运行了
这是自问自答么,哈哈哈
typeof param 会以字符串的形式返回 param 的类型,比如 let type = typeof param,此时 type 就是一个字符串,在进行一次 typeof 自然返回的是 string