Created
September 11, 2016 00:38
-
-
Save rvighne/d43bd1b7b8d9f37df526994e93fa6a99 to your computer and use it in GitHub Desktop.
Get a random integer in the widest possible range of positive integers.
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
function randInt() { | |
return Math.trunc(Math.random() * Number.MAX_SAFE_INTEGER); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment