Created
November 27, 2019 21:17
-
-
Save Stuyk/f4588e8f98f20f13a330660a4f8c9d42 to your computer and use it in GitHub Desktop.
Random EOS Name
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
const letters = '12345abcdefghijklmnopqrstuvwxyz'; | |
function randomName(length) { | |
let newName = ''; | |
for (let i = 0; i < length; i++) { | |
let number = Math.floor(Math.random() * letters.length - 2) + 2; | |
newName += letters[number]; | |
} | |
return newName; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment