Last active
January 5, 2022 19:30
-
-
Save hpieroni/93b2669f1f652cda458cb01e9e0c6fd7 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 randomBetween(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