Código
<html>
<head>
<script>
const generateRandomString = (num) => {
const characters ='abcdefghijklmnopqrstuvwxyz';
let result1= "";
const charactersLength = characters.length;
for ( let i = 0; i < num; i++ ) {
result1 += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result1;
}
console.log(generateRandomString(27));
</script>
</head>
<body>
Código
</body>
</html>