JSFiddle - React, Tailwind, and code Playground

by ordette

JavaScript

var alphabet = "abcdefghijklmnopqrstuvwxyz";

var randomString = "";
var randomLetter = "";
while (randomString.length < 6) {
	randomLetter = alphabet[Math.floor(Math.random() * alphabet.length)];
	randomString = randomString + randomLetter;
}

randomString;