Advertisement
dibusure

js code

Jul 13th, 2021
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. let genPassword = (len) => {
  2. const symbols = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789()_!";
  3.  
  4. let password = "";
  5. for (let i = 0; i < len; i++) {
  6. password += symbols.charAt(Math.floor(Math.random() * symbols.length));
  7. }
  8. return password;
  9. }
  10. let number = document.getElementById(number);
  11. genPassword(int(number));
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement