Skip to content

Instantly share code, notes, and snippets.

@abramovantonru
Last active January 18, 2017 15:38
Show Gist options
  • Save abramovantonru/755e8a2a3d0205370ca982002e957241 to your computer and use it in GitHub Desktop.
Save abramovantonru/755e8a2a3d0205370ca982002e957241 to your computer and use it in GitHub Desktop.
get random integer by min and max range {js, func, rnd}
function rand(min, max) { // get random integer by min and max range
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