rnadom number in js code example
Example 1: javascript random
function random(min, max) {
return ~~(Math.random() * (max - min + 1) + min);
}
random(1, 5);
Example 2: random numbers javascript
Math.floor(Math.random() * 100); // returns a
random integer from 0 to 99