random number generate with javascript code example
Example 1: angular random number between 1 and 10
function randomNumber(min, max) {
return Math.random() * (max - min) + min;
}
Example 2: random int javascript
//Returns random Int between 0 and 2 (included)
Math.floor(Math.random()*3)