Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var test = function(){};
- testProto = test.prototype;
- testProto.a = function(){
- return this;
- }
- testProto.b = function(){
- return this;
- }
- var idx = 0;
- testProto.c = function(){
- console.log('call -> ' + (idx++))
- var self = this;
- setInterval(self.c.bind(self) , 1000)
- }
- var test = new test();
- test.a().b().c();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement