SHARE
TWEET

Untitled

a guest Nov 14th, 2019 158 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Test {
  2.   constructor(num) {
  3.     this.num = num;
  4.   }
  5.  
  6.   foo = () => {
  7.     return () => {
  8.       console.log(this);
  9.       console.log(this.num);
  10.     }
  11.   }
  12. }
  13.  
  14. test = new Test(100);
  15.  
  16. f = test.foo();
  17.  
  18. f();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top