16
#JavaScript xxx === void 0 是什么意思?
source link: https://xmanyou.com/javascript-what-does-void-0-mean/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
24 September 2021
/ JavaScript
#JavaScript xxx === void 0 是什么意思?
判断一个变量是否undefined的一种做法是:
if( typeof(xxx) === "undefined" ){
// xxx undefined
}
还有一种写法是:
if( xxx === void 0 ){
// xxx undefined
}
阿斌
Read more posts by this author.
扫一扫关注微信公众号:耿直的IT男阿斌
聊一聊IT男眼中的世界
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK