Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.49 KB

README.md

File metadata and controls

35 lines (25 loc) · 1.49 KB

Unit Review: Age Calculator Project

Project Description

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]

Day 1

Set-Up

JavaScript

  • 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.

Wrap

  • Push your changes!
  • Save and submit your website link using the link on the session agenda.

Project Extensions

  • 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.

Hint

Having trouble? Make sure you are using the right types of data to do your math by using the console.