daily pastebin goal
87%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Wrapper {
  2.   property = 'test';
  3.  
  4.   nestedObj = {
  5.     get wrapperProperty() {
  6.       return this.property; // Error: this.property is undefined
  7.     }
  8.   }
  9. }
  10.    
  11. nestedObj = {
  12.   wrapperProperty: () => this.property
  13. }
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
 
Top