Was reading some information regarding execution context of javascript. I was reading the following article of Rupesh Mishra.
The article stated that a new execution context is created with every new function invocation. An execution context does have 2 phases creation phase and execution phase where the code is executed line by line.
There was stated that an in the creation phase the JS engine does 3 things:
thisThis was the explanation of the activation object:
Creates the Activation object or the variable object: Activation object is a special object in JS which contain all the variables, function arguments and inner functions declarations information. As activation object is a special object it does not have the dunder proto property.
Does ES5+ still has this activation object structure? If not, what are the current steps of the creation phase of an execution context?
Nope, ES5 (and higher) does no longer use a standard JS object to store variables. It uses lexical environments (with this value and scope chain) that contain environment records of various kinds in which the values for the variables are stored.
What are the current steps of the creation phase of an execution context?
Section 10.4 Establishing an Execution Context talks about that.
The behaviour is not too different from what ES3 did (after all old code still works), it's just described using new terms.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With