Created
February 22, 2020 14:37
-
-
Save jsmeltzer/c18a64da6d9fca57dc3cbd2d68e0a9bd to your computer and use it in GitHub Desktop.
Returns an integer random number between min (included) and max (included):
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 randomInteger(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