JS中!!的作用

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

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