Guest User

Untitled

a guest
Dec 16th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. function extend(Child, Parent){
  2. var Temp = function(){};
  3.  
  4. Temp.prototype = Parent.prototype;
  5.  
  6. Child.prototype = new Temp();
  7.  
  8. Child.prototype.constructor = Child;
  9.  
  10. }
  11.  
  12. function extend(Child, Parent){
  13.  
  14.  
  15. Child.prototype = new Parent();
  16.  
  17. Child.prototype.constructor = Child;
  18.  
  19. }
Add Comment
Please, Sign In to add comment