Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const obj = {
- func0: function() {
- console.log('this is func0');
- return this;
- },
- funcA: function() {
- console.log('this is funcA');
- return this;
- },
- funcB: function() {
- console.log('this is funcB');
- return this;
- }
- };
- let chain = () => obj.func0();
- chain()
- .funcA()
- .funcB();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement