Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 2 years ago

Age Calculator (HTML, CSS, JS)

Ryan Stehle•210
@ryan17stehle
A solution to the Age calculator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What did you find difficult while building the project?

Styling the input elements was interesting. I tried to use the :invalid pseudo-class and ran into some issues, so I ended up doing all of the error styling in JS by adding/removing classes.

Which areas of your code are you unsure of?

Particularly the input validation. The min/max values were straight-forward but for something more complex I'm sure I would've struggled more.

Do you have any questions about best practices? Definitely error-handling / input validation. I know there's a great many libraries that handle this much better than I did here, but I wanted to try it on my own first.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Ryan Stehle's solution.

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub