You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> `this` is a binding that is made when a function is invoked, what it references is determined by entirely by the **[call-site](#call-site)** where the function is called.
27
22
> When a function is invoked, an **execution context** is created which contains the following information:
28
23
29
-
[Execution context](/todos)
30
24
31
-
- Where the function was called from (the [call stack](/todos))
25
+
- Where the function was called from (the [call stack](#))
One of the most important properties of [execution context](/todos) is the `this` reference that will be used for the duration of that function call.
32
+
One of the most important properties of [execution context](#) is the `this` reference that will be used for the duration of that function call.
39
33
40
34
## How to determine call-site ? {#call-site}
41
35
42
36
[call-site](#call-site): The location in code where a function is called (not where it's declared).
43
37
44
-
Because [call stack](/todos) is a stack of functions that have been called to get us to the current moment of execution. The call-site of a function is in the invocation _before_ the currently executing function. In other words, it is the second item from the top of [call stack](/todos). see the the image below
0 commit comments