更新时间:2023-12-04 11:27:34
===
和!==
是严格的比较运算符:
===
and !==
are strict comparison operators:
JavaScript既有严格也有
类型转换相等比较。
对于strict
相等,
比较的对象必须具有相同的类型并且:
JavaScript has both strict and type-converting equality comparison. For
strict
equality the objects being compared must have the same type and:
NaN
不是 NaN
。 对象
,则两个对象严格相等。 Null
和未定义的
类型是 ==
(但不是 ===
)。 [即( Null ==未定义
)是 true
但是( Null ===未定义
) false
] NaN
is not
equal to anything, including NaN
.
Positive and negative zeros are equal
to one another.Object
.Null
and Undefined
types are ==
(but not ===
). [I.e. (Null==Undefined
) is true
but (Null===Undefined
) is false
]