Skip to content

Instantly share code, notes, and snippets.

@davmillar
Created October 28, 2013 20:20
Show Gist options
  • Select an option

  • Save davmillar/7203866 to your computer and use it in GitHub Desktop.

Select an option

Save davmillar/7203866 to your computer and use it in GitHub Desktop.
Quick function for generating a random integer.
var randInt = function (rMin, rMax) {
return (rMin + Math.floor(Math.random() * (rMax - rMin + 1)));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment