In the code below it would be interesting if I could define i as let and be able to keep pass as var, can you do that without declaring pass in a row above?
const randPass = () => {
for (var i = 0, pass = ""; i < 8; i++) {
pass = '${pass}${randChar()}';
}
return pass;
}