Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Age Calculator

Liberator 140

@Liberator-I

Desktop design screenshot for the Age calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

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

m1mmseen 460

@m1mmseen

Posted

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 helpful

1

Liberator 140

@Liberator-I

Posted

@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 GitHub
Discord logo

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