Created
May 10, 2017 01:34
-
-
Save brunomonteiro3/27af6d18c2b0926cdd124220f83c474d to your computer and use it in GitHub Desktop.
Generate random number between two numbers in JavaScript
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
function randomIntFromInterval(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
function Numbers(min,max){
console.log(Math.floor(Math.random()*(max-min+1)+min));
}
Numbers(15, 20)