Age calculator app using HTML CSS JS

Solution retrospective
I need some help, for some reason the years and days result is inverted and i can't figure out why. Any help is much appreciated.
Please log in to post a comment
Log in with GitHubCommunity feedback
- Account deleted
Very nice work ✨, Congratulations
it seems like you inverted the
id
in theHTML
code, you just have to invert theid
in the line 37 and theid
in the line 39, then everything must work perfectlyGood luck in the next 🔥, keep going on
Marked as helpful - @alex931d
hello great solution and very nice javascript code. regarding your question: i notice in your html that you have the days id in the year container and so on to fix this simpliy change the order of the id's
also i have some improvements you could do
- don't use id's or classes to select elements use data attributes instead
- don't use getelementbyid since its outdated use document.queryselector instead
- splice your javascript document to smaller files you can simpliy do that by make a new file and link the file in you'r markup
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