Skip to content

Instantly share code, notes, and snippets.

@MD4
Last active July 20, 2016 09:37
Show Gist options
  • Save MD4/cfaeef6e2b0dd217107b62465dcfabfa to your computer and use it in GitHub Desktop.
Save MD4/cfaeef6e2b0dd217107b62465dcfabfa to your computer and use it in GitHub Desktop.
var generateLolilolPassword = (chars, length) => Array
.apply(null, { length })
.map(() => chars[ (Math.random() * chars.length) >> 0 ])
.join('')
generateLolilolPassword('azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN1234567890', 10) // cw49XRZWF0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment