Created
September 3, 2019 23:06
-
-
Save masautt/9057137469aa1519a3c9c668a28bfed5 to your computer and use it in GitHub Desktop.
How to randomly generate alpha-numeric id in JavaScript?
This file contains hidden or 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
let idLength = 6; | |
Math.random().toString(36).slice(idLength); // y80wde7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment