Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split('');
- function generatePassword(L){
- return Array.from({length: L})
- .map(i => alphabet[Math.floor(Math.random() * alphabet.length)])
- .join("")
- }
- console.log(generatePassword(14));
Add Comment
Please, Sign In to add comment