It's important to note that nothing is actually moved to the top. That's just a convenient mental model to understand the consequences of what is actually going on
Yes Jon, Nothing is actually moved to the top. The variable and function declarations are put into memory during the compile phase, but stay exactly where you typed them in your code. During Execution Phase, variable and function declarations are executed first, so they will be in reserved memory.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's important to note that nothing is actually moved to the top. That's just a convenient mental model to understand the consequences of what is actually going on
Yes Jon, Nothing is actually moved to the top. The variable and function declarations are put into memory during the compile phase, but stay exactly where you typed them in your code. During Execution Phase, variable and function declarations are executed first, so they will be in reserved memory.