Last active
February 24, 2021 11:25
-
-
Save munierujp/97abcbc63815f4469f2ba4d013b7ed92 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
function getRandomNumber ( | |
min: number, | |
max: number | |
): number { | |
min = Math.ceil(min) | |
max = Math.floor(max) | |
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