Last active
August 29, 2015 14:10
-
-
Save epitron/75810fd0aa8f31f31487 to your computer and use it in GitHub Desktop.
wtf
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
$ Number.prototype.divmod = function (n) { return [Math.floor(this / n), this % n]; } | |
=> function (n) { | |
return [Math.floor(this / n), this % n]; | |
} | |
$ typeof 1 | |
=> "number" | |
$ typeof 1.0 | |
=> "number" | |
$ 1.0.divmod | |
=> embedded:16 function (n) { | |
return [Math.floor(this / n), this % n]; | |
} | |
$ 1.divmod | |
=> VM378:762 Uncaught SyntaxError: Unexpected token ILLEGAL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment