Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created May 1, 2017 03:46
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 miguelmota/38dc95f02ab72bf74dc76a162558f424 to your computer and use it in GitHub Desktop.
Save miguelmota/38dc95f02ab72bf74dc76a162558f424 to your computer and use it in GitHub Desktop.
JavaScript random integer between range
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment