Skip to content

Instantly share code, notes, and snippets.

@Titiaiev
Last active June 25, 2016 18:45
Show Gist options
  • Save Titiaiev/cf601cac5d8ea9fe77c9a1d26638b7f5 to your computer and use it in GitHub Desktop.
Save Titiaiev/cf601cac5d8ea9fe77c9a1d26638b7f5 to your computer and use it in GitHub Desktop.
функция рандомного целого числа в заданом диапазоне
function randomInteger(min, max) {
var rand = min + Math.random() * (max + 1 - min);
rand = Math.floor(rand);
return rand;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment