Design comparison
Solution retrospective
Password Generator
-
What did you find difficult while building the project?
CSS: I found some difficult styling the input range, specially having two different colors on the input.
JavaScript: I found some difficult when I try to create a function that check if all my checkbox inputs were unchecked or at least one were checked. Because depends on this the generate button would be able or not. Also I didn't know how copy with the clipboard, looking on internet I found an old way to do it (deprecated). I'll let the way below of how you copy a value on your clipboard just because I didn't know until this project and maybe can help somebody:
const myInput = document.querySelector("#my-input").value;
const submitBtn = document.querySelector("#submit");
function copyClipboard() {
try {
// This line copy what you have on your input.
navigator.clipboard.writeText(myInput);
} catch (err) {
console.log("Error with the clipboard API", err);
}
}
submitBtn.addEventListener("click", copyClipboard);
-
Which areas of your code are you unsure of?
I would say that the area of my code that I'm unsure is on the Strength level bars. They don't are really analyzing the password an making sure if is really a strong password or not. they're just checking how many checkboxes are marked and depends on this make a result.
Community feedback
- @clickgluePosted about 2 months ago
Hi Johan, what I like is that your code is clean, easy to read and well commented. So it is easy to follow. I think the overall result misses some details (slider, :hover, copied indication) compared to the figma file, but those are details. Good work, one or two iterations and it should be excellent!
0
Please log in to post a comment
Log in with GitHubJoin 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