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 be28
I hope that helps!
Marked as helpful
1
GIGACHAD• 230
@Khalid-debugg
Posted
@Chanda-Abdul Smart woman move, ofc u r not single.
0