Trying to create a random letter generator with a "while" loop. It's return one value into the randomString and then quits the loop.
var alpha = "abcdefghijklmnopqrstuvwxyz";
var randomString = "";
while (randomString.length < 6) {
console.log(randomString += alpha.charAt(Math.floor(Math.random() * alpha.length)));
randomString++;
}
Returns one value from alpha string to randomString and then quits the loop instead of going on for 4 more loops - condition set at (randomString.length < 6).
randomString++is going to do on a string - but that might be an issue. (It returnsNaN)randomString++;