Skip to content

Commit

Permalink
Create rand-range.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lastmjs authored Nov 7, 2017
1 parent 3f331ad commit 67b0d08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rand-range.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//returns a random integer between min (included) and max (included)
function randRange(max, min) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}

0 comments on commit 67b0d08

Please sign in to comment.