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

ola3bosun 330

@ola3bosun

Desktop design screenshot for the Age calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

@NxumaloDev

Posted

Great job @ola3bosun! Couple of issues unfortunately...

  • The submit button works...but when i keep clicking it gives me a different value on the month tab
  • I also the calculations are a bit off (after clicking the submit button)
  • The error validation tab works... but it does not disappear even after typing in the appropriate values.
  • The error validation does not account for negative values.

However don't be discouraged as everything works as expected...but only the first time or after i reload the site.

I quickly looked at your code -avoid using var, instead use let. -I guess you could create another function to use as a fallback i.e function which removes the styling of the error validation when user types correct values.

if(birthDay < presentDate){ presentDate = presentDate + monthDays[presentMonth--]; //maybe this is what's causing the month issue? presentMonth = presentMonth--; }

"Good artists copy, great artists steal"

Marked as helpful

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