random 1 to 5 js code example
Example: javascript random
function random(min, max) {
return ~~(Math.random() * (max - min + 1) + min);
}
random(1, 5);
function random(min, max) {
return ~~(Math.random() * (max - min + 1) + min);
}
random(1, 5);