Advertisement
Guest User

Untitled

a guest
May 25th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function Client(){this.a = 1;}
  2.  
  3. Client.prototype.methodA = function(){}
  4. Client.prototype.methodB = function(){}
  5.  
  6. function SubClient = function(){}
  7. Subclient.prototype.methodA = function(){}
  8.  
  9. var a = new Client() ;
  10. a.SubClient.methodA() ;
  11.  
  12. //Doesn't work - this.a is undefined
  13. Client.prototype.SubClient = {methodA: function(){}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement