Skip to content

Instantly share code, notes, and snippets.

@Kolenov
Created February 24, 2017 20:50
Show Gist options
  • Save Kolenov/f118abe819316e168856debb178c9229 to your computer and use it in GitHub Desktop.
Save Kolenov/f118abe819316e168856debb178c9229 to your computer and use it in GitHub Desktop.
Get a random number in a specific range
var x = 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