Skip to content

Instantly share code, notes, and snippets.

@shahab65
Created February 24, 2020 14:48
Show Gist options
  • Save shahab65/2b7ca9654d35bfc79b098f9b139aba06 to your computer and use it in GitHub Desktop.
Save shahab65/2b7ca9654d35bfc79b098f9b139aba06 to your computer and use it in GitHub Desktop.
function getRandomInt(min, max) {
  min = Math.ceil(min);
  max = Math.floor(max);
  return Math.floor(Math.random() * (max-min)) + min
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment