Object inheritance

by Codi Bezouka-Smith

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
}