Created
June 27, 2017 19:07
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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