JSFiddle - React, Tailwind, and code Playground

JavaScript

var randomStrLength = 16,
    pool = 'abcdefghijklmnopqrstuvwxyz0123456789',
    randomStr = '';
    

for (var i = 0; i < randomStrLength; i++) {
     
     var randomChar = pool.substr(Math.floor(Math.random() * pool.length), 1);

     randomStr += randomChar;   
     
}
    

alert(randomStr);