Last active
March 25, 2016 20:08
-
-
Save BenBals/523660074ffe47a3de66 to your computer and use it in GitHub Desktop.
Random number in JS
This file contains 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
random = function(from, to) {return Math.floor((Math.random() * to) + from);}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Coffee version:
ES2015 version: