This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateRandomIdentifier(length) { | |
const firstLetterCode = 97; | |
const numberOfLetters = 25; | |
const randomCharacter = function () { | |
const letterPosition = Math.round(numberOfLetters * Math.random()); | |
return String.fromCharCode(firstLetterCode + letterPosition); | |
}; | |
let identifier = ''; |