JSFiddle - React, Tailwind, and code Playground
HTML
<textarea id='foo' style='width:100%;height:200px'></textarea>
JavaScript
function randString(x){
var s = "";
while(s.length<x&&x>0){
var r = Math.random();
s+= (r<0.1?Math.floor(r*100):String.fromCharCode(Math.floor(r*26) + (r>0.5?97:65)));
}
return s;
}
document.getElementById("foo").value = randString(10);