JavaScript Scope, Closures, and Functional Patterns for Pythonistas (Fast Track) Quiz

Interactive Quiz ⋅ 10 Questions
By Stephen Gruppetta

In this quiz, you’ll test your understanding of JavaScript Scope, Closures, and Functional Patterns for Pythonistas (compact).

By working through this quiz, you’ll revisit the Python habits that misfire when a Python script’s functions move to JavaScript: reaching for global and nonlocal, reading an outer name above a block’s own declaration, fearing every later constant, treating var like let, calling a var function too early, keeping each pass of a var loop, reading a closure’s state as a property, putting an option after a rest parameter, expecting a timer to cut in, and calling a curried arrow all at once.

Most questions show a short snippet from the bouldering gym’s front desk, often next to the Python you’d write, and ask what it does in JavaScript or which version does the job. Good luck!

The quiz contains 10 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!

Related Resources

A developer operates a climbing-gym ticket machine with SCOPE, CLOSURE, and CALLBACK stations.

Course

JavaScript Scope, Closures, and Functional Patterns for Pythonistas (Fast Track)

Port a bouldering gym's front-desk script to JavaScript in this faster version, and learn how JavaScript scope and closures work, and how to use rest parameters, callbacks, and timers.

intermediate js py