Guest User

Untitled

a guest
May 27th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. // @Param integer, integer - Takes two integers as input
  2. // Returns an integer that is min inclusive and max exclusive
  3. // @Return integer
  4.  
  5. const randomIntRange = (min, max) => {
  6. min = Math.ceil(min);
  7. max = Math.floor(max);
  8. return Math.floor(Math.random() * (max - min)) + min;
  9. }
Add Comment
Please, Sign In to add comment