create a function for creating the 7 random alphanumeric characters string in javascript code example
Example 1: generate random alphanumeric string javascript
Math.random().toString(36).substr(2, 6);
Example 2: javascript function to generate random alphanumeric string
var characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
var result = ""
var charactersLength = characters.length;
for ( var i = 0; i < 5 ; i++ ) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
console.log(result)