Skip to content

Instantly share code, notes, and snippets.

@oomlaut
Created July 16, 2013 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oomlaut/6009484 to your computer and use it in GitHub Desktop.
Save oomlaut/6009484 to your computer and use it in GitHub Desktop.
generates a random integer based on a parameter
/**
* 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