Design comparison
Solution retrospective
I struggled with getting accurate ages when compared to many other sites that do age conversion. I would appreciate it if someone decided to check up on my code and see where I went wrong. But I had fun with this as I learnt to use and manipulate the date object which I knew about but never touched myself. I completed it it relatively quickly as things are starting to click but spent days trying to work out ways to make it more accurate
Community feedback
- @m1mmseenPosted about 1 year ago
At first i struggled too on getting the right ages with the Date class. But i was not satisfied with all my tries :D Finally, I just subtracted the Date elements individually (day, month, year) because of the loose typing in js .In addition, I simply made queries that take care of the limit values (monthly and yearly transitions). I also calculated the months using a median. Please take a look at my code here on Github.
Marked as helpful1@Liberator-IPosted about 1 year ago@m1mmseen Thank you very much! Going through your code helped me see what kind of approach you decided to take. Definitely gave me more insight on how I could have done a few things differently myself
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