Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let genPassword = (len) => {
- const symbols = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789()_!";
- let password = "";
- for (let i = 0; i < len; i++) {
- password += symbols.charAt(Math.floor(Math.random() * symbols.length));
- }
- return password;
- }
- let number = document.getElementById(number);
- genPassword(int(number));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement