MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/btxz72/what_are_some_javascript_things_beginners_dont/ep5p7nm
r/javascript • u/[deleted] • May 28 '19
383 comments sorted by
View all comments
Show parent comments
0
[deleted]
1 u/[deleted] May 28 '19 can you give me an example of how runninglet o = { f: function() { console.log(this); } };o.f();prints out anything except the Object o?Also, to your first point, yes you can change the context at the call point with call/apply/bind, however, am I wrong to say that this applies to the closure created by the function in non call/apply/bind cases?
1
can you give me an example of how running
let o = { f: function() { console.log(this); } };
o.f();
prints out anything except the Object o?
Also, to your first point, yes you can change the context at the call point with call/apply/bind, however, am I wrong to say that this applies to the closure created by the function in non call/apply/bind cases?
0
u/[deleted] May 28 '19
[deleted]