DevPath · Learn to code ESPTEN

JavaScript

🔒 Scope, hoisting and closures

Who can see which variable, why something sometimes exists before you declare it, and how a function remembers the world where it was born.

What you'll learn

Lessons

Scope: global, local and blockWho can see which variable. HoistingHow JavaScript 'hoists' declarations. ClosuresFunctions that remember their environment.
Practice this module in the app

DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.

Start free in the app →