How to Create a Simple Age Counting Application Using JavaScript

On this occasion I want to discuss how to calculate age based on year of birth using JavaScript. Later, the user enters their date of birth, and with the new Date () function, the program calculates the age by comparing between today’s and the entered date.

Don’t dwell, here are the steps to create a simple application to calculate age based on year of birth:

1. Open the XAMPP control panel and activate Apache and MySql.

2. Open a text editor such as Notepad ++ or Dreamweaver and enter the following script code.

	Menghitung Umur Berdasarkan Tanggal Lahir
Menghitung Umur Berdasarkan Tanggal Lahir


Umur Anda adalah:

Save the script code above, save it in the xampplite folder – htdocs – create a new folder (here I create a new folder called “inwepo”) – I save it with the filename “date.php”.

3. To see the results of the script code above, you can open your browser and go to http: //localhost/inwepo/date.php. input

4. To be able to run the program, below

At add the following JavaScript code.


5. Reload http: //localhost/inwepo/date.php and here are the results:

Results:

This is the tutorial, How to Create a Simple Age Counting Application Using JavaScript. Much luck.