Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Returns a random integer in an inclusive range of min to max
- // example getRandInt(1,6) will simulate rolling dice.
- function getRandInt(min, max) {
- return Math.floor(Math.random() * (max - min + 1)) + min;
- }
Add Comment
Please, Sign In to add comment