Created
July 16, 2013 14:56
-
-
Save oomlaut/6009484 to your computer and use it in GitHub Desktop.
generates a random integer based on a parameter
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
/** | |
* used for testing purposes only | |
* @param {int} size the maximum number possible | |
* @return {array} a random integer | |
*/ | |
function randomInt(max){ | |
return Math.ceil(Math.random() * max); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment