function Person (name, age, job) { this.name = name; this.age = age; this.job = job; } Person.prototype.getAgeAndName = function () { return this.age + ' ' + this.name; } Person.older = function (person1, person2) { return person1.age >= person2.age ? person1 : person2; } const seo = new Person('SDS', 30, 'Programmer'); const ahn = new Person('AHY', 28, 'Staff'); console.log(seo.getAgeAndName()); console.log(Person.older(seo, ahn));