js generate random number between 1 and 10000 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