function random_string(size : number) : string {
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
const len = characters.length;
let rnd = '';
for (let i = 0; i < size; i++) {
rnd += characters.charAt(Math.floor(Math.random() * len));
}
return rnd;
}
console.log(random_string(9));
/*
run:
"EdXqaejMD"
*/