function getRandomLowercaseLetter() {
const randomCharCode = Math.floor(Math.random() * 26) + 97; // 97 is ASCII/Unicode code for 'a'
return String.fromCharCode(randomCharCode);
}
function GetRandomLowercaseString(n) {
let s = "";
for(let i = 0; i < n; i++ ) {
s += getRandomLowercaseLetter()
}
return s;
}
console.log(GetRandomLowercaseString(8));
/*
run:
vukxktow
*/