Last active
February 6, 2020 04:12
-
-
Save anubhavsrivastava/2bd7cd81fb23d138df99c47988855adc to your computer and use it in GitHub Desktop.
Can (a===1 && a===2 && a===3) ever evaluate to true?
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
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