Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

278
Views
How to make a password generator with javascript where i can toggle length, special characters, numbers, uppercase and lowercase
function genPassword() {
    var chars = "0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*()ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    var passwordLength = prompt("Length:Enter a number between 8-128");
    var specialcharacters = prompt("Would you like special characters?");
    var numeric = prompt("Would you like numbers?");
    var upper = prompt("Would you like uppercase?");
    var lower = prompt("Would you like lowercase?");
    var password = "";
for (var i = 0; i <= passwordLength; i++) {
   var randomNumber = Math.floor(Math.random() * chars.length);
password += chars.substring(randomNumber, randomNumber +1);
  }
        document.getElementById("password").value = password;
}

When i click my generate btn i should get 5 prompts and the prompts should us that info to create the password like 8(for length), yes, no, no, yes.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

  • Start with four different strings, one for each group of characters
  • Start with empty chars
  • For each "yes", append the appropriate character group to chars
  • Then pick at random from the constructed chars.
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!