Guest User

Untitled

a guest
Jan 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. function Employee(name, title) {
  2. Person.call(this, name); // super(name)
  3. this.title = title;
  4. }
  5. Employee.prototype = Object.create(Person.prototype);
  6. Employee.prototype.constructor = Employee;
  7. Employee.prototype.describe = function() {
  8. return Person.prototype.describe.call(this) // super.describe()
  9. + ' (' + this.title + ')';
  10. };
  11.  
  12. Employee.prototype.constructor = Employee;
Add Comment
Please, Sign In to add comment