首页
话题
动态
专家
文章
作者
公告
更多
积分规则
登录 或 注册
首页
话题
动态
专家
文章
作者
公告
积分规则
发表新帖
发表新帖
Is NaN falsy? Why NaN === false returns false
前端
未结
关注
7
854
走了就别回头了
2020-12-13 18:43
Why
NaN === false
=> false, isn\'t NaN falsy?
Why
NaN === NaN
=> false, but
!!NaN === !!NaN
=> true
I\'v
7条回答
渐次进展
(楼主)
2020-12-13 19:20
NaN and false are both the subset of Falsy.
NaN == false -> they're both falsy -> thus 'TRUE'
NaN === false -> they're
NOT
the same type -> thus 'FALSE'
0
讨论(0)
查看其它7个回答
发布评论:
提交评论
加载中...
验证码
看不清?
提交回复
热议问题