Age calculator app solution using HTML, CSS, and JavaScript

Solution retrospective
Having a fully running app that works and managed to get all the bugs and tweaks I could think of and that I ran into in user testing. I think my large if...else statement that makes up the bulk of the JavaScript functionality and adds in the error messages could probably be smaller and refactored again.
What challenges did you encounter, and how did you overcome them?One of my challenges was when I began adding in my own error messages to alert the user to issues, as the system generated 'max' attribute in the HTML was overriding what I was trying to achieve and also some rules in different parts of the code were affecting the outcomes as well. This is where I then made big changes and refactored the code into one large if...else statement to make sure there were no clashes and everything ran in order. The 'max' attributes were all removed from the HTML and I also added in the disabling of the submit button until all the rules had been met, and any necessary changes had been made by the user.
From previous projects I've found taking regular breaks is always helpful. Also with this particular issue I wrote everything out on a sheet of paper to set up the if...else pathway.
What specific areas of your project would you like help with?Any feedback is welcome I think there's probably a way to have written a lot less code that I've missed so that would be great to hear about if so.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Adam Rafferty'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