random number between 1-100 js code example
Example 1: generate random number javascript
function randomNumber(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
Example 2: javascript random number between
Math.floor(Math.random() * 6) + 1
Example 3: javascript generate random number
Math.random();