Created
April 11, 2023 07:22
-
-
Save bockoblur/5420f0cca240b744045ab65de3d49412 to your computer and use it in GitHub Desktop.
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
const getRandomInt = (min = 0, max = 1) => { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
// The maximum is exclusive and the minimum is inclusive | |
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