Created
November 7, 2018 18:54
-
-
Save anubhavsrivastava/4680a165db9e1abc459c5987e778a674 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
const a = { value : 0 }; | |
a.valueOf = 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