this
keyword explanation by u/delventhalz/
This discussion took place in r/learnjavascript
on this post
Most explanations for this are I think overly technical. You don't need to know what an "execution context" is in order to understand this. Here is the way to think of it:
-
It works like a function parameter
-
Instead of being between the parentheses like other parameters, it is the the thing to the left of the dot