js generate 20 long random alphanumeric code example
Example 1: create random 4 digit number js
var val = Math.floor(1000 + Math.random() * 9000);
console.log(val);
Example 2: javascript random no between 2 numbers
function randomIntFromInterval(min, max) { // min and max included
return Math.floor(Math.random() * (max - min + 1) + min);
}