Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Prototype
  2. function Person(name, age){
  3.     this.name = name
  4.     this.age = age
  5. }
  6.  
  7. Person.prototype.getAge = function(){
  8.   return this.age
  9. }
  10.  
  11. //Differential
  12.  
  13. function Person(name, age){
  14.   this.name = name;
  15.   this.age = age;
  16.   this.getAge = function(){
  17.     return this.age
  18.   }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement