In this mini-project, you will use JavaScript concepts like variables, operators, and data types to build an interactive website that calculates age.You will likely also need to access and use the dev tools.
Follow the steps below to make your very own site! Make sure to check off your items as you complete them. [ ] => [x]
- Go to the repository at https://github.com/itscodenation/age-calculator-starter
- Fork this repository to your Github account and pull it down to Glitch.
- Add, commit, and push your changes.
- Create a new variable that stores the user's birth year.
- This variable should hold the birth year that the user inputs on the page.
- Create a new variable to store the age of the user.
- Calculate the user's age by subtracting their birth year from the year you live in today. Store the result in the age variable.
- Append the user's age to the message div.
- Add a name input so the app can display a more personalized message.
- Push your changes!
- Save and submit your website link using the link on the session agenda.
- Extension: Add another input for the user to put in the current year and do the math from there so the app always works
- Extension: Style your app any way you want.
Having trouble? Make sure you are using the right types of data to do your math by using the console.