SHARE
TWEET

this

RandomGuy32 Oct 18th, 2019 (edited) 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Entry {
  2.     // ...
  3.    
  4.     test() {
  5.         console.log(this);
  6.     }
  7. }
  8.  
  9. // ...
  10.  
  11. let entry = new Entry();
  12. let button = document.createElement("button");
  13. button.onclick = entry.test;
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