// Function Constructor

var john = {
  name: "john",
  yearOfBirth: 1990,
  job: "teacher"
};

console.log(john);

var Person = function(name, yearOfBirth, job) {
  this.name = name;
  this.yearOfBirth = yearOfBirth;
  this.job = job;
};

Person.prototype.calculateAge = function() { 
    console.log(2019 - this.yearOfBirth);
}

var mike = new Person("mike", 1991, "developer");
console.log(mike);
mike.calculateAge();
