Created
March 16, 2015 10:56
-
-
Save PuKoren/a1cd1e8252e87eade2c5 to your computer and use it in GitHub Desktop.
[JS] Random Integer function
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
var getRandomInt = function (max, min) { | |
min = min || 0; | |
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