Skip to content

Instantly share code, notes, and snippets.

@marcelitocs
Created June 27, 2017 19:07
Show Gist options
  • Save marcelitocs/826eedde43890ad9b02d92dc4375db10 to your computer and use it in GitHub Desktop.
Save marcelitocs/826eedde43890ad9b02d92dc4375db10 to your computer and use it in GitHub Desktop.
Função que retorna um número inteiro randômico entre um intervalo
// Retorna um número inteiro rondômico entre min (incluso) e max (incluso)
function getRandomIntFromInterval(min, max) {
return 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