Skip to content

Instantly share code, notes, and snippets.

@devdays
Created December 8, 2014 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devdays/ef70781545f684329c0c to your computer and use it in GitHub Desktop.
Save devdays/ef70781545f684329c0c to your computer and use it in GitHub Desktop.
Object JavaScript - Be sure this has an owning object
alert("NaN is NaN: " + isNaN(NaN));
function x() {
this.isNaN = function() {
return "not anymore!";
};
}
// alert!!! trampling the Global object!!!
x();
alert("NaN is NaN: " + isNaN(NaN));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment