Calculating Age with Javascript

The following code block will help you to calculate age simply with Javascript.

var yearOfBirth = 2001
console.log( new Date().getFullYear() - yearOfBirth )
Comments

There are no comments, make the firs comment