Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js password generator

const generateRandomPassword = () => {
    return Array(15) //password length
      .fill(
        "0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*()ABCDEFGHIJKLMNOPQRSTUVWXYZ"
      )
      .map(function (x) {
        const pwd = Math.floor(Math.random() * x.length);
        return x.substring(pwd, pwd + 1);
      })
      .join("");
  };

console.log(generateRandomPassword()) //'XX)PUMqA1mpDtZQ'
Source by github.com #
 
PREVIOUS NEXT
Tagged: #js #password #generator
ADD COMMENT
Topic
Name
8+2 =