Calculate person’s age from the date of birth

To calculate a person’s age from the date of birth use vanilla JavaScript:

function Person(dob) {
  this.birthday = new Date(dob);
  this.calculateAge = function() {
    const difference = Date.now() - this.birthday.getTime();
    const ageDate = new Date(difference);
    return Math.abs(ageDate.getUTCFullYear() - 1970);
  }
}
const person = new Person('9-10-1990');
console.log(person.calculateAge());