Advertisement
pharmokan

this bind apply call object js

May 27th, 2020
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. function asdf() {
  2. return this.a
  3. }
  4. let k = {a:'hi'}
  5.  
  6. asdf.bind(k)() //'hi'
  7. asdf.call(k) //'hi'
  8. asdf.apply(k) //'hi'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement