Created
January 23, 2017 13:31
-
-
Save tfogo/145f0cca75c67dc0480137b72ecbe5e8 to your computer and use it in GitHub Desktop.
Random integer function
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
| function getRandomInt(min, max) { | |
| // max and min numst be integers | |
| return Math.floor(Math.random() * (max - min)) + min; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment