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

Okay JUNIOR Tiiiiiime !!!!!!

GIGACHAD 230

@Khalid-debugg

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


The only logic I couldn't implement is if a user input a day that was not on the month (ex. user input day = 31) and the month has only 30 days it will still calculate it and I couldn't find solutions for it.

Community feedback

Chanda 800

@Chanda-Abdul

Posted

👋🏾

To validate the day, you could use and array to store the days for each month. ex. const daysPerMonth = [31,28,31,30,31,30,31,31,30,31,30,31];

  • and access each month by it's index. So if you wanted to see how many days were in the second month of the year(February), you could use daysPerMonth[1] which should be 28

I hope that helps!

Marked as helpful

1

GIGACHAD 230

@Khalid-debugg

Posted

@Chanda-Abdul Smart woman move, ofc u r not single.

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