Created
December 23, 2014 05:41
-
-
Save cheng470/f4573dc04a7c0eaef011 to your computer and use it in GitHub Desktop.
由于 NaN 是 JavaScript 中唯一一个不等于其自身的值,因此,你可以随时通过检查一个值是否等于其自身的方式来测试该值是否是 NaN。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isReallyNaN(x) { | |
return x !== x; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment