Age calculator using the Date object on js
Design comparison
Solution retrospective
I'm proud I could create a good logic to this hard (even looking easy) project. I'm proud I learned how to manage dates on js and how to deal with inputs, this is going to be important to a next project
Next time, as I'm a begginer and was dealing with a new type of logic that I never used, I would plan more, think more, and code what is necessary. I've lost much time coding and coding and i got to a moment that i was not even understanting what i was writing
What challenges did you encounter, and how did you overcome them?The biggest problem on this project was calculating the dates. It may look easy, just do a plus/minus equation, but it's not this way. As there are years with 365 and 366 days, and there as months with 28, 29, 30 and 31 days, it got a bit harder to make a consistent and eficient logic. But hopefully, with times of planing and thinking and testing, I got a logic that solves all the variables of errors and incorrect calculations
What specific areas of your project would you like help with?I would like do get help on the js good sintax pratices
Community feedback
- @Brian-PobPosted 10 months ago
Hi Luiz! Great job on your solution!
You mentioned that you would like some comments on your JS syntax. I took a look at your code and it seems pretty good to me!
I do have a few suggestions:
- Use
===
instead of==
in JavaScript. The triple equals operator is known as the "strict equality" operator. It will not perform any type conversions when comparing two items. This is important so that you don't accidentally compare two things as equal. - If you are using a modern text editor or IDE, you can use linters and formatters to help make sure your code is written in a consistent way.
Hope this helps!
Marked as helpful1@LuizFlavioPintoPosted 10 months ago@Brian-Pob Thank you friend!! Going to look at this point
0 - Use
Please log in to post a comment
Log in with GitHubJoin 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