generate random no in js code example
Example 1: how to generate a random number in javascript
Math.random();
Math.floor(Math.random())
Math.floor(Math.random() * 10) + 1
Example 2: get random numbers javascript
Math.floor(Math.random() * n);
Example 3: how to generate random number in javascript
var randomNo = Math.floor(Math.rand() * 10000000001);
console.log(randomNo);
Example 4: generate random integer javascript
var randomnumber = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;