We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在这里引用一下 MDN 里面的解释:
Object.is()
==
"" == false
true
Object.is
===
NaN
-0
+0
Number.NaN
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在这里引用一下 MDN 里面的解释:
Object.is()
与==
不同。==
运算符在判断相等前对两边的变量(如果它们不是同一类型)进行强制转换(这种行为将"" == false
判断为true
),而Object.is
不会强制转换两边的值。Object.is()
与===
也不相同。差别是它们对待有符号的零和NaN
不同,例如,===
运算符(也包括==
运算符)将数字-0
和+0
视为相等,而将Number.NaN
与NaN
视为不相等。The text was updated successfully, but these errors were encountered: