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 app solution

Galih Arizzaā€¢ 230

@chadittya

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


Hi, Iā€™m Galih šŸ«”, and this is my solution for this challenge. ā­

Build with:

  • Next
  • TypeScript
  • Tailwind CSS

Any suggestions on how I can improve and reduce unnecessary code are welcome!

Thank you.šŸš€ā¤ļø

Community feedback

Account Deleted

Nice Work āœØ

but the app needs some improvement, the age calculation operation is not work very well, try to enter the days 30 and the month February, it will work and don't give error, and there are cases the calculation operation gives the months and the days in negative, search more on how to make your code more efficient

Hint:

  • you have to see if the months or the days are less than 0, then add 12 month and remove 1 year, that's in the month case
  • in the days case, remove 1 month and add the previous month days

hope this help you

Good luck in the next challenges šŸ”„

1

Galih Arizzaā€¢ 230

@chadittya

Posted

@MasterMousa yes I acknowledge it right after I submit the solution. thank you! already fixed it, I already checked 30 February 1990 have expected result 33 years 2 month 0 days.

Please let me know if there is any issues again.

1

Account Deleted

@chadittya it is working perfectly right now šŸ”„

amazing work, keep going on āœØ

1

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