little comment about object method -- if you use arrow function convention ()=> again this will show windows object (apparently all arrow function doing this no matter where they are)
Hey Matt, you are absolutely right that one use case of arrow function is to stabilize the context of "this". I covered that part in detailed in my Arrow Function video where I show when to use and when not to use arrow function. Checkout that video😊
@@DipeshMalvia thanks Dipesh. I think reading yehudakatz.com/2011/08/11/understanding-javascript-function-invocation-and-this/ would be also helpful - especially final conclusion could ease the pain.
Hi Naushad, you are absolutely correct we can set "this" context using "fat arrow function" as it uses lexical scope. I covered this part in my "Arrow Function".
Missed one important point...Arrow function doesn't have its own context. It behaves differently than normal function.
Hey Just wanted to say I found your channel and you explain things really well and easy to understand,
Thanks, Like & subs :)
Awesome, thank you!
what a clear explaination! awesome buddy
Good content.I think u r videos worth more likes.
Thanks!
THIS is very helpful.
Thanks!
little comment about object method -- if you use arrow function convention ()=> again this will show windows object (apparently all arrow function doing this no matter where they are)
Hey Matt, you are absolutely right that one use case of arrow function is to stabilize the context of "this". I covered that part in detailed in my Arrow Function video where I show when to use and when not to use arrow function. Checkout that video😊
@@DipeshMalvia thanks Dipesh. I think reading yehudakatz.com/2011/08/11/understanding-javascript-function-invocation-and-this/ would be also helpful - especially final conclusion could ease the pain.
Helpful 🙌🏽
Glad it was helpful!
but with help of "fat arrow function" we can bind the context of "this" inside an object
Hi Naushad, you are absolutely correct we can set "this" context using "fat arrow function" as it uses lexical scope. I covered this part in my "Arrow Function".
Ty
Welcome Scarasect
There is a mistake in this explanation. The callee function in the case of person.checkThis() is checkThis() and the caller is the 'person ' object.
👍
Thanks!