console.log("12" === 12)
console.log (NaN === NaN)
console.log (typeof(null) === typeof(window))
console.log ([1,2,3] === [1,2,3])
typeof运算符把类型信息以字符串返回,返回值有六种可能:"number","boolean","string","object","function","undefined"
使用typeof检查数组、null和function都会返回 ’ object ‘
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题