Advertisement
Guest User

Untitled

a guest
Apr 17th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Person(firstname, lastname) {
  2.     this.firstname = firstname;
  3.     this.lastname = lastname;
  4.  
  5.     if (!Person.prototype.getFullname) {
  6.         Person.prototype.getFullname = function () {
  7.             return this.firstname + ' ' + this.lastname;
  8.         };
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement