JavaScript hoisting in 10 minutes





The interactive transcript could not be loaded.



Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Apr 4, 2016

Hoisting controls when variables get instantiated and when they get assigned their initial values.

Hoisting is one of the more subtle parts of variable behaviour, along with scope, shadowing and closures. If you learn how hoisting works, you can avoid some weird bugs. And you can also get a really interesting peek under the hood at how the computer runs your JavaScript code.

You'll learn what hoisting is. You'll learn when it happens and how it changes the values of variables. You'll learn that the JavaScript runtime, that is, the program that runs your code, takes multiple passes as it does so, and you'll learn what happens during each pass.

We'll run some example programs to see and understand the effects of hoisting. I'll give you some quizzes so you practice applying your knowledge of hoisting and deepen your understanding of its effects.

  • Category

  • License

    • Standard YouTube License


When autoplay is enabled, a suggested video will automatically play next.

Up next

to add this to Watch Later

Add to

Loading playlists...