Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Employee(name, title) {
- Person.call(this, name); // super(name)
- this.title = title;
- }
- Employee.prototype = Object.create(Person.prototype);
- Employee.prototype.constructor = Employee;
- Employee.prototype.describe = function() {
- return Person.prototype.describe.call(this) // super.describe()
- + ' (' + this.title + ')';
- };
- Employee.prototype.constructor = Employee;
Add Comment
Please, Sign In to add comment