Skip to content

Instantly share code, notes, and snippets.

@anubhavsrivastava
Last active February 6, 2020 04:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anubhavsrivastava/2bd7cd81fb23d138df99c47988855adc to your computer and use it in GitHub Desktop.
Save anubhavsrivastava/2bd7cd81fb23d138df99c47988855adc to your computer and use it in GitHub Desktop.
Can (a===1 && a===2 && a===3) ever evaluate to true?
var value = 0; //window.value
Object.defineProperty(window, 'a', {
get: function() {
return this.value += 1;
}
});
console.log(a===1 && a===2 && a===3) //true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment