Skip to content

Instantly share code, notes, and snippets.

@jsmeltzer
Created February 22, 2020 14:37
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 jsmeltzer/c18a64da6d9fca57dc3cbd2d68e0a9bd to your computer and use it in GitHub Desktop.
Save jsmeltzer/c18a64da6d9fca57dc3cbd2d68e0a9bd to your computer and use it in GitHub Desktop.
Returns an integer random number between min (included) and max (included):
function randomInteger(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