showing results for - "generate random password javascript"
Coralie
29 Oct 2020
1 const randomStringMake = (count)=> {
2    const letter = "0123456789ABCDEFGHIJabcdefghijklmnopqrstuvwxyzKLMNOPQRSTUVWXYZ0123456789abcdefghiABCDEFGHIJKLMNOPQRST0123456789jklmnopqrstuvwxyz";
3    let randomString = "";
4    for (let i = 0; i < count; i++) {
5        const randomStringNumber = Math.floor(1 + Math.random() * (letter.length - 1));
6        randomString += letter.substring(randomStringNumber, randomStringNumber + 1);
7    }
8    return randomString
9}
10 
11console.log(randomStringMake(10))
Isabella
18 Mar 2019
1const alpha = 'abcdefghijklmnopqrstuvwxyz';
2const calpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
3const num = '1234567890';
4const specials = ',.!@#$%^&*';
5const options = [alpha, alpha, alpha, calpha, calpha, num, num, specials];
6let opt, choose;
7let pass = "";
8for ( let i = 0; i < 8; i++ ) {
9  opt = Math.floor(Math.random() * options.length);
10  choose = Math.floor(Math.random() * (options[opt].length));
11  pass = pass + options[opt][choose];
12  options.splice(opt, 1);
13}
14console.log(pass);
15
David
17 Sep 2020
1function generatePassword(passwordLength) {
2  var numberChars = "0123456789";
3  var upperChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
4  var lowerChars = "abcdefghijklmnopqrstuvwxyz";
5  var allChars = numberChars + upperChars + lowerChars;
6  var randPasswordArray = Array(passwordLength);
7  randPasswordArray[0] = numberChars;
8  randPasswordArray[1] = upperChars;
9  randPasswordArray[2] = lowerChars;
10  randPasswordArray = randPasswordArray.fill(allChars, 3);
11  return shuffleArray(randPasswordArray.map(function(x) { return x[Math.floor(Math.random() * x.length)] })).join('');
12}
13
14function shuffleArray(array) {
15  for (var i = array.length - 1; i > 0; i--) {
16    var j = Math.floor(Math.random() * (i + 1));
17    var temp = array[i];
18    array[i] = array[j];
19    array[j] = temp;
20  }
21  return array;
22}
23
24alert(generatePassword(12));
queries leading to this page
password generator js confirmangular random password generatorrandom password generator in jsrandom password using simple javascriptcreating a password generator in javascriptjavascript code for random password generatorjavascript strong password generatorjavascript challenge password generatorhow to generate password jsjs genearate random passwordjavascript random password generator with rulesjavascript generate strong passwordhtml and js password generatorrandom password generator with prompts javascriptbuild a password generator with javascript tutorialunique password javascripthow to generate random passwrd javascriptgenrate random password in jsgeneratore password javascriptjavascript random password generatorrandom password generateur jscreate a random password generator javacriptfor loops for password generatorn javascriptmake method in javascript for password generatorhow to create a random password generator in javascriptusing js to generate passwordrandom password generator in javascriptrandom password angularjavascript generate complex passwordhow to create a password generator with javascriptstrong password generator javascriptgenerate random password with special characters javascrtipvanilla javascript multiple character array password generatorcreate password generator app javascript sectionjs generate passwordjavascript generate passwordfunction random password javascriptjavascript generate random passwordpassword gen in jsgenerate password javascriptjavscript random passwordhow to get random password in jsgeneratepassword 28 29 javascriptrandom password generator with javascripthow to create a password creator using javascriptnodejs generate random passwordhow to generate a random password in javascriptpassword generator javascrptgenrate password function javascriptgenerate random password stackoverflow javascriptrandom password and username template jsjs secure password generatorpassword function generator jsjs generate random strong passwordhow to generate a random strong password in javascriptgenerate password in javascriptpasswordgen 28num 29 jsgenerate secure random passwordjavascript javascript random passwordjquery password generatorcreate password generator javascriptcreate a random password with map function javascriptjscriot generate password from certain carssection 3acreate password generator app javascripthow to make a password generatorin javascriptjs genereate randome passwordauto generate password in javascripthow to start a password genertor in javascript3 random words password generator javascriptpassword generator javascriptfunction random password jspassword genarator javascriptjs generate password stringjavascript password generator librarygeneraterandom password jscreate random password in javascript16 digit random password generator javascriptpassword generator web app with javascriptjs password generator onlinegenerate random password jsrandom characters prefills password stackoverflow reactjavascript complex password generatorpassword generator jsrandom password generator jsjavascript password generatorwrite js code to make random password generatorpassword generator js libraryalgorithm for password generator jsgenerate secure string password in nodejsjs password generatorjs password genhow to create a password generator using jsgeneratepassword 28 29 jsnode create random passwordgetasecurerandompassword 28 29 javascriptpassword generator algorithm javascriptgeneratepassword 28 29 3b jsgenerate random password jquerygeneerate password jscreate an random password jsnode generate random passwordhow to auto generate password in javascriptsecure password generator jsstrong password javascriptcreate a simple password generator javascriptgenerate random password javascriptpassword generator javascript simplehow to create a random password generator javascriptauto generate password jqueryjavascript 2b password generatorpassword generator in jsstrong password generator jsjavascript generate random string passwordpassword generator and password strength using javascriptgenerator strong password jspassword generator java scriptnodejs password generate numbers onlyjavascript random password generater with min8charcreate random password javascriptpassword generator on jrandom password generator javascripthow to create a password generator in javascriptis it okay to make a password generator and store it using jscommon password generator jsmaking a password generator in jsprompt for password generator javascriptgenerate 10 character password jquerygenerate password javascript codegenerate strong password javascripthow to create a password generator javascriptmake password generator javascriptpassword generator in javascript codevar randnum 3d math floor 28math random 28 29 2a chars length 29 3b password 3d password 2b chars 5brandnum 5d console log 28password 29how to create a for loop for a random password generator javascriptgenerate random and unique password javascriptjs password genrjavascript function to generate random passwordjs random passwordpassword with 8 characters in nodejsfunction that create a password with the length of the parameter in javascriptgenerate password jsrandom password genreator javasscriptgenerate random password with javascriptgenerating password javascriptjavascript password generator npmgenerate secure random password javascriptjs randomly generate a password that meets certain criteriagenerate random password vanilla jsrandom password jspassword generator with javascriptcreate password generator javascript errorhow to generate random password in javascriptpassword generator js codehow to create a for loop for a password generator javascriptrandom password generator using jsrandom password generator in c 23gen password javascriptgenerate password hash jspassword generator javascript using confirm and promptjavascript for loop password generator even distributionjavascript password generator examplehow to create password generator in javascriptgenerate automatic password javascripthow do you write a for loop in javascript for password generatorjs create random passwordnode js random passwordjs generate passowrdwhere to console log when generating random passwordscreate password generator app javascriptjavascript generate password stringjavascript homework 3a password generatorpassword generator steps in javascriptgenerator of password script javascriptgenerate password with javascriptgenerate random password function javascriptrandom password generator character length javascripttypescript random password generatorjavascript password generator with rulesjs make a random passwordjs how to generate a passwordpassword generator coding javascriptgenerate a strong password using javascriptpassword list generator javascriptjs random password generatorrandom password javascriptjavascript password generator with special symbolajs auto generate passwords with regexjavascript generate password functionjavascript generate a passwordpassword generator using javascriptradom password jspassword generator in javascriptauto generate password jquery with one upper case lowercase and special chartergenerate random password string javasriptgenerate 8 digit random password in javascripthow to generate password in javascriptjs random simple password generatorjavascript generate password with 5 numbershow to create a random password in javascripthow to make a password generator in javascriptjs generate random passwordjavascript 3a password generatorrandom password generator function javascriptcreating a password generator javascriptgenerate random password javascript