r/learnjavascript • • Dec 18 '22

Cannot understand "this" keyword

My head is going to explode because of this. I watched several videos, read articles from MDN, W3schools, and TOP, and I still can't understand.

There's so many values and scenarios around it and I feel like they're explained so vaguely! I struggle to get familiar with it. Can someone drop their own explanation?

90 Upvotes

58 comments sorted by

View all comments

Show parent comment

3

u/ziaalich Dec 19 '22

good explanation, loved it.

i also made a gist, did some formatting so if anyone wants to save it, they can fork it

https://gist.github.com/ziadevcom/2ab8995d5811410bfb02d388dd82956f