Last active
June 20, 2018 07:11
-
-
Save keithwhor/6ad11a67add5860a75b0e8b0e3694af9 to your computer and use it in GitHub Desktop.
Code.xyz Function: Silly API Example
This file contains 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
class A { | |
constructor () { | |
this.value = 0; | |
} | |
valueOf () { | |
return ++this.value; | |
} | |
toString () { | |
return this.valueOf(); | |
} | |
} | |
/** | |
* Proves that `(a == 1 && a == 2 && a == 3) == true` can work in JavaScript | |
*/ | |
module.exports = async () => { | |
let a = new A(); | |
return [a == 1, a == 2, a == 3]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment