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, and vanilla Javascript

@SatyapriyaMahato

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


When I was making the design for the mobile version many times the horizontal line was hidden when the screen size was reduced to mobile. So any suggestion on that part would be very helpful if there is a better way to do so. Also, I am unsure about the javascript logic that I have used because it's a very brute-force method that I have used. I am not sure if it is the best way to calculate the age. Other than these any suggestions would be very helpful regarding any mistakes that I have done or any best practices that I should have followed.

Community feedback

@0xabdulkhalid

Posted

Hello there 👋. Congratulations on successfully completing the challenge! 🎉

  • I have other recommendations regarding your code that I believe will be of great interest to you.

JAVASCRIPT 🟡:

  • The way you declared variables are need to be well structured and organized
  • Take a look at the following example code which describes a better way of declaring variables to have a well structured code
const firstName = "Your";
const lastName = "Name";
const emailAddress = "[email protected]";
const password = "supersecret";
  • instead try this,
const firstName =  "Your",
       lastName =  "Name",
       emailAddress = "[email protected]"
       •••                
       •••         // n number of declarations
       password = "supersecret";   // make sure to add a semicolon at end of last declaration
  • This single line declaration with separated commas will helps you to have a better structured code and improves readability though

I hope you find this helpful 😄 Above all, the solution you submitted is great !

Happy coding!

Marked as helpful

0

@SatyapriyaMahato

Posted

Thank you @0xAbdulKhalid . It's really helpful. I will do the changes.

0

@Danish49

Posted

nicely done

0

@issarali538

Posted

Please take care of width and length your design goes bigger@SatyapriyaMahato

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