Created
May 1, 2017 03:46
-
-
Save miguelmota/38dc95f02ab72bf74dc76a162558f424 to your computer and use it in GitHub Desktop.
JavaScript random integer between range
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 getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment