Skip to content

Instantly share code, notes, and snippets.

@oomlaut
Created July 16, 2013 14:56
Show Gist options
  • 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