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 app using HTML CSS JS

@ClaudiuSonica

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 need some help, for some reason the years and days result is inverted and i can't figure out why. Any help is much appreciated.

Community feedback

Account Deleted

Very nice work ✨, Congratulations

it seems like you inverted the id in the HTML code, you just have to invert the id in the line 37 and the id in the line 39, then everything must work perfectly

Good luck in the next 🔥, keep going on

Marked as helpful

1

@ClaudiuSonica

Posted

@MasterMousa Thanks you for pointing that out, i finished the project last night and i stayed like 2 hours trying to figure out the problem, i just couldn't see the ids :))))

1

Account Deleted

you're welcome @ClaudiuSonica

happy coding ;) and good luck

1
P
alexander 1,300

@alex931d

Posted

hello great solution and very nice javascript code. regarding your question: i notice in your html that you have the days id in the year container and so on to fix this simpliy change the order of the id's

also i have some improvements you could do

  1. don't use id's or classes to select elements use data attributes instead
  2. don't use getelementbyid since its outdated use document.queryselector instead
  3. splice your javascript document to smaller files you can simpliy do that by make a new file and link the file in you'r markup

Marked as helpful

1

@ClaudiuSonica

Posted

@alex931d Thanks for the info and much more for the tips, i'll try and implement what you've told me

1

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