Created
September 15, 2019 15:45
-
-
Save djD-REK/54a0e6ada5da133c7fbf53d0075b53e9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
let variable = NaN; // or let variable = Number.NaN | |
// Check for NaN by checking for self-equality | |
console.log(variable != variable); // true | |
console.log(variable !== variable); // true | |
// NaN is the only value that is not equal to itself | |
let isNaN = (maybeNaN) => maybeNaN!=maybeNaN; | |
console.log(isNaN(variable)); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment