DEV Community

Discussion on: Understand Hoisting in JavaScript once and for all

Collapse
 
amarjits profile image
Amarjit Singh

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.