intro-component-with-signup-form using flexbox

Solution retrospective
I would like to improve my javascript skills as with this one I think it can be done with much simple or less lines of code then I have used. Any feedback is appreciated
Please log in to post a comment
Log in with GitHubCommunity feedback
- @kodan96
hi there! 👋
Instead of defining a conditional statement for every
input
field you can select all the fields withquerySelectorAll()
, define aforEach()
loop and you can toggle the corresponding error message and icon within that, based on their index. So I suggest you look upforEach()
. I also suggest to look for stuff aboutmodular programming
andnamespace pollution
to make your life easier when you get to bigger projects.Hope this helps 🙏
Good luck and happy coding! 💪
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