Zoh*_*ule -2 javascript
!aJavaScript 中的和之间有区别吗a===null?我正在从事一个表现不同的项目。
!a
a===null
我不是在谈论布尔值,但!true我不会和true===null
!true
true===null
if (!this.props.user)结果为真,
if (!this.props.user)
好像(this.props.user === null)结果为 false
(this.props.user === null)
Spe*_*ric 6
!atrue如果a是任何Falsy 值(例如,false, undefined, null, 0...),则返回
true
a
false
undefined
null
0
a === null仅当ais时才返回 true null。
a === null
归档时间:
3 年,10 月 前
查看次数:
89 次
最近记录: