Created
October 27, 2021 16:18
-
-
Save brettski/f696706e5c73a8a5020acc74835dc1ce to your computer and use it in GitHub Desktop.
Randomize alpha-numeric string
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
return Math.random() | |
.toString(36) | |
.substr(2, 6) | |
.toUpperCase(); // e.g. 'CM2JUR' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment