mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-11-29 10:27:07 +08:00
* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
9 lines
784 B
Markdown
9 lines
784 B
Markdown
# Hoisting
|
|
|
|
Hoisting is JavaScript's behavior of moving variable and function declarations to the top of their containing scope before code execution. Variables declared with `var` are hoisted and initialized as `undefined`. Function declarations are fully hoisted, meaning they can be called before they appear in the source code. `let` and `const` are hoisted but not initialized, resulting in a temporal dead zone.
|
|
|
|
Visit the following resources to learn more:
|
|
|
|
- [@article@What is Hoisting - MDN Docs](https://developer.mozilla.org/en-US/docs/Glossary/Hoisting)
|
|
- [@article@Understanding Hoisting](https://www.digitalocean.com/community/tutorials/understanding-hoisting-in-javascript)
|
|
- [@video@Learn JavaScript Hoisting In 5 Minutes](https://www.youtube.com/watch?v=EvfRXyKa_GI) |