Answers for "how to generate a random number with min and maxi n JS"

1

random number between min and max script

function getRandomNumberBetween(min,max){
    return Math.floor(Math.random()*(max-min+1)+min);
}
Posted by: Guest on July-18-2020
-1

function to get random number from min max range

funtion getRandomNumber(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max-min) )
}
Posted by: Guest on July-11-2020

Code answers related to "how to generate a random number with min and maxi n JS"

Code answers related to "Javascript"

Browse Popular Code Answers by Language