JSFiddle - React, Tailwind, and code Playground

JavaScript

function Person (firstName, lastName, age) {
    this.firstName = firstName;
    this.lastName = lastName;
    this.age = age;
}
function Animal (name, type, age) {
    this.name = name;
    this.type = type;
    this.age = age;
}
var family = {};
family.father = new Person ('John', 'Doyle', 33);
family.mother = new Person ('Susan', 'Doyle', 32);
family.pet = new Animal ('Jodie', 'Cat', 2);

alert(family.father.constructor === family.mother.constructor);