Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 3 years ago

Password generator using js vanilla

animation, semantic-ui
GuiFraV•200
@GuiFraV
A solution to the Password generator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I had a lot of fun with this challenge. First, I realized the logic to generate a random password in javascript. Then I built the html. Then I design with css. By the way, I had some difficulties with the css to customize the checkboxes and the input range. That's why it doesn't look exactly like the template. Indeed, the use of -webkit-apparence-none to create its own input seems to me very tedious. So even with an input generator I did not manage to achieve the desired result.

The main logic of my javascript file is split in three parts: 1) Generates a password length, 2) Sets the length in the machine and 3) the machine creates a random password. To generate a random password I have three variables that contain the alphabet, numbers and special characters that I select randomly with math.floor and math .random. It works pretty well ! I think it's possible to refactor the code using regex Feel free to check my code!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on GuiFraV's solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License