how to generate a random number with min and maxi n JS code example
Example 1: random number between min and max script
function getRandomNumberBetween(min,max){
return Math.floor(Math.random()*(max-min+1)+min);
}
Example 2: 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) )
}