Skip to content

Instantly share code, notes, and snippets.

@bcherry
Created February 16, 2010 07:16
Show Gist options
  • Save bcherry/305371 to your computer and use it in GitHub Desktop.
Save bcherry/305371 to your computer and use it in GitHub Desktop.
NaN === NaN; // false
NaN + 1; // NaN
NaN = 1;
NaN === NaN; // true
NaN + 1; // 2
typeof undefined; // "undefined"
undefined = 1;
typeof undefined; // "number"
@manikantag
Copy link

Yeah, it is strange that we can name variable with NaN & undefined and it causes misleading errors if we do so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment