Object inheritance
JavaScript
function Employee (firstName, lastName, deptCode) {
this.firstName = firstName;
this.lastName = lastName;
this.deptCode = deptCode;
}
Employee.prototype.getSummary = function() {
return this.lastName
+ ', '
+ this.firstName
+ ' | '
+ this.deptCode
}