Created
September 29, 2020 08:14
-
-
Save Regis011/d2a607f365367ba77d50aaab5283c3b3 to your computer and use it in GitHub Desktop.
This is javascript code maker for unique kay or id for your app
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
| codeMaker(length) { | |
| var result = ''; | |
| var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~'; | |
| var charactersLength = characters.length; | |
| for ( var i = 0; i < length; i++ ) { | |
| result += characters.charAt(Math.floor(Math.random() * charactersLength)); | |
| } | |
| return result; | |
| } | |
| console.log(codeMaker(128)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment