扫码关注官方订阅号
业精于勤,荒于嬉;行成于思,毁于随。
typeof x === 'undefined'
typeof typeof x相当于typeof 'undefined'
typeof 任何东西得到的都是字符串。
typeof obj 返回的结果是string 类型。undefined 不是string类型
typeof obj
string
undefined
typeof 111 //"number" typeof typeof 1 //"string" 实际判断的是typeof 1 返回结果的类型
注意看undefined的颜色不一样,此undefined非彼undefined
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
typeof x === 'undefined'
typeof typeof x相当于typeof 'undefined'
typeof 任何东西得到的都是字符串。
typeof obj返回的结果是string类型。undefined不是string类型注意看undefined的颜色不一样,此undefined非彼undefined
