输入:typeof {"x":1} 输出:"object"
输入:typeof 1 输出:"number"
输入:typeof [{x:1}] 输出:"array"
输入:typeof NaN 输出:"number"
const typeofPrint = { obj:typeof {}, Func:typeof function(){}, string: typeof "", number: typeof 0, boolean: typeof true, NaN:typeof NaN, null:typeof null, undefined:typeof undefined, } console.group(typeofPrint);
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题