Design comparison
SolutionDesign
Solution retrospective
Any tips on optimizing my Js code?
Community feedback
- @mattstuddertPosted about 5 years ago
Your solution looks really good Zeek, great work! In your JS you're repeating these 3 lines in a few different places:
icon.style.display = 'inline'; message.style.display = 'block'; inputItem.className += " active";
This is a perfect candidate to abstract these lines into a named function that you can call whenever you need to.
I'd also recommend taking a look at other people's solutions to this challenge. You can learn a lot by seeing how others solved the same problem.
I hope that helps. Keep up the great work!
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