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 for React, styled-components, Vitest practice

@pbryan9

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 probably overlooked a simpler approach, but I found calculating the age surprisingly tricky. I used it as an opportunity to familiarize myself with test-driven development (just for the logic part -- not so much on the rendered output). It was good fun, but I can't help feeling there's a better solution.

(PS I know I didn't implement the leap year edge case...hopefully there aren't any other holes in it though!)

Community feedback

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