Created
September 11, 2018 23:46
-
-
Save luislobo14rap/a1f63c4a7bad7e4c2fd05f0be89805fd to your computer and use it in GitHub Desktop.
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
// randomString.js v1 | |
function randomString(length = 10, characters = 'abcdefghijklmnopqrstuvwxyz') { | |
let result = ''; | |
for (let i = 0; i < length; i++) { | |
result += characters[Math.floor(Math.random() * characters.length)]; | |
}; | |
return result; | |
}; |
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
// randomString.min.js v1 | |
function randomString(a=10,b='abcdefghijklmnopqrstuvwxyz'){let c='';for(let d=0;d<a;d++)c+=b[Math.floor(Math.random()*b.length)];return c} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
deprecated by https://gist.github.com/luislobo14rap/4e89de12f6b0690611fad393d27f75f2