Created
January 12, 2022 22:07
-
-
Save AbreuY/d6b9883c6e1fefbd19e6b1166e502a0e to your computer and use it in GitHub Desktop.
Generate a random number from given numbers. min and max.
This file contains hidden or 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 randomNumber(min, max) | |
{ | |
let result; | |
result = Math.floor(Math.random() * (max - min + 1)) + min; | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment