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
No description provided.
The text was updated successfully, but these errors were encountered:
Number.isNaN(NaN) isNaN(NaN) Number.isNaN('NaN') isNaN('NaN')
Sorry, something went wrong.
试了下 Number.isNaN('NaN') 是 false,其他都是 true
Number.isNaN('NaN')
false
true
还真没注意过,看了下 MDN,上面解释已经很明示了
isNaN
Return Value: true if the given value is NaN after being converted to a number; otherwise, false.
Number.isNaN
Return value: The boolean value true if the given value is a number with value NaN. Otherwise, false.
globalThis.isNaN 会对参数进行强制转换后判断是不是 NaN,而 Number.isNaN 不会对输入的参数进行强制转换
globalThis.isNaN
NaN
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: