Created
August 13, 2014 06:48
-
-
Save Prinzhorn/db302a92fbbe082a0c75 to your computer and use it in GitHub Desktop.
Functions for checking if an int is equal to another int. So intuitive!
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
| for(var i = 0; i < 4294967296; i++) { | |
| global['is' + i] = (function(i) { | |
| return function(n) { | |
| return !(i - n); | |
| }; | |
| }(i)); | |
| } | |
| console.log(is5(5));//true | |
| console.log(is5(9));//false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment