Created
April 6, 2017 18:23
-
-
Save callmecavs/9204d13855c8508d5c0c5eb99af2e5a1 to your computer and use it in GitHub Desktop.
random number between 2 integers (inclusive)
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
// generates a random integer between min & max bounds, inclusive | |
const randBetween = (min, max) => { | |
return Math.floor(Math.random() * (max - min + 1) + min) | |
} | |
export default randBetween |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment