📘function declaration instantiation
🚧 under construction
Last updated
Was this helpful?
🚧 under construction
Last updated
Was this helpful?
Was this helpful?
JS ⟩ value ⟩ function ⟩ declaration ⟩ instantiation
🚧
⭐ function declaration instantiation
When an execution context is established for evaluating a function:
a new is created.
bindings for each are instantiated in that .
body declarations are also instantiated:
⭐ if the parameters do not include any default value initializers: the body declarations are instantiated in the same as the parameters❗(👉 )
(s) / (s) are initialized as part of . All other bindings are initialized during evaluation of the function body.
📘 ⟩
⭐ if default value initializers exist:
a second Environment Record is created for the body declarations❗