Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. const obj = {
  2. func0: function() {
  3. console.log('this is func0');
  4. return this;
  5. },
  6. funcA: function() {
  7. console.log('this is funcA');
  8. return this;
  9. },
  10. funcB: function() {
  11. console.log('this is funcB');
  12. return this;
  13. }
  14. };
  15.  
  16. let chain = () => obj.func0();
  17.  
  18. chain()
  19. .funcA()
  20. .funcB();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement