Order of precedence during JS engine compilation phase

I'm trying to understand how the order of precedence for function and variable declarations and variable assignment and function definition during the JavaScript engine's compilation phase interacts with other things that go on during the compilation phase. Please tell me if this looks right:

  1. Allocate memory and set up reference to any function identifiers
  2. Allocate memory and set up reference to any variable identifiers
  3. Assign values to variables
  4. For each function, create a new execution context and scope and add a reference to the parent scope
javascripthoisting

Answers

comments powered by Disqus