Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // @Param integer, integer - Takes two integers as input
- // Returns an integer that is min inclusive and max exclusive
- // @Return integer
- const randomIntRange = (min, max) => {
- min = Math.ceil(min);
- max = Math.floor(max);
- return Math.floor(Math.random() * (max - min)) + min;
- }
Add Comment
Please, Sign In to add comment