Password Generator App with Vanilla JS

Solution retrospective
I am proud of creating a working password generator, it still needs improvement in determining the password strength.
What challenges did you encounter, and how did you overcome them?The biggest challenge was customizing the range slider. I found a helpful article https://blog.logrocket.com/creating-custom-css-range-slider-javascript-upgrades/
What specific areas of your project would you like help with?Any feedback in general, especially in Javascript.
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@YuliaLantzberg
Hi Purnama. Nice work. However, there are a few things that I've noticed.
- There is no main in your HTML. The HTML doc must have the main tag. Also, you use span as an independent tag. Those are important points for accessibility.
- The bullet of the slider remains in the active state even when I leave it and not hover until I click somewhere else. It gives the feeling that something is wrong or frozen.
- In checkPasswordStrength() you have first if else statements and then switch. The switch is unnecessary. In fact it makes code less maintainbale and vulnerable for further bugs. You can remove "hidden" class in the same if else statements.
- There are separate getRandom functions for each case and each of them has almost the same code. Maybe it's better to write the generic getRandom function that receives the min and max values.
I hope that makes sense :-)
Marked as helpful
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