Learn JavaScript

Lesson 7 of 9 · Scope, Hoisting and Closures

Module 6 · Scope, Hoisting and Closures

Problems: Scope, Hoisting and Closures

Free with an accountProblems

Ten problems, graded against hidden tests on Node 22, the same JavaScript the Playground runs. You met every one of them in this module. running-average and many-counters were in lesson 01, and loop-capture, scope-lookup and tdz-check were in lesson 02. Lesson 03 held wallets and memo-stairs, lesson 04 held stale-clicks, and debounce-fires and rate-limiter were in the CP and Interview Pack.

Checking what this lesson needs for you…

What is inside Problems: Scope, Hoisting and Closures

  1. Reading commands until the count runs out
  2. One closure per thing that keeps state
  3. Simulating scopes with a stack of boxes
  4. The edges the hidden tests try