Created
September 8, 2016 13:50
-
-
Save pietrom/5a0ca748a94d585072d0494576cd34a9 to your computer and use it in GitHub Desktop.
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
function randomInt(from, to) { | |
var interval = to - from + 1; | |
return function() { | |
return Math.floor(Math.random() * interval) + from; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment