Age calculator program in javascript

Age calculator program in javascript

Here you will learn to create an age calculator program in javascript language.

This program takes a birth year as input, calculates the age based on the current year, and outputs the result to the console. You can change the birth year in the calcAge function call to calculate the age for a different year.

 

Program code of age calculator program in javascript

Output

Please enter your birth year: 1990

You are 34 years old.

 

 

 

Check out our other JavaScript examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top