Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. 'use strict'
  2.  
  3. const testObj = {
  4. a: 10,
  5. whoamI: function() {
  6. console.log(this);
  7. }
  8. };
  9.  
  10. testObj.whoamI();
  11. testObj.a = 20;
  12. setTimeout(testObj.whoamI, 10);
  13.  
  14. // Output
  15. // { a: 10, whoamI: [Function] }
  16. // { _called: true,
  17. // _idleTimeout: 10,
  18. // _idlePrev: null,
  19. // _idleNext: null,
  20. // _idleStart: 89,
  21. // _onTimeout: [Function],
  22. // _repeat: null }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement