Skip to content

Instantly share code, notes, and snippets.

@PuKoren
Created March 16, 2015 10:56
Show Gist options
  • Save PuKoren/a1cd1e8252e87eade2c5 to your computer and use it in GitHub Desktop.
Save PuKoren/a1cd1e8252e87eade2c5 to your computer and use it in GitHub Desktop.
[JS] Random Integer function
var getRandomInt = function (max, min) {
min = min || 0;
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