JS中!!的作用

!!是将表达式强制转化为bool值的运算,

NaN || undefined || null || 0 || ''都为false
posted @ 2019-03-04 11:37  仁义礼智信的  阅读(937)  评论(0编辑  收藏  举报