# Closures in JavaScript

Closures in JavaScript: Closures: Functions That Remember, Closures at Work: Private State and Factories.

Updated: November 14, 2026

1. [Closures: Functions That Remember](https://www.ask-codey.com/lessons/javascript-closures-functions-that-remember) (Journeyman): A closure is a function together with the variables it could see where it was made, so it keeps using them after the function that made them has finished.
2. [Closures at Work: Private State and Factories](https://www.ask-codey.com/lessons/javascript-closures-private-state-and-factories) (Journeyman): Put closures to work to keep a count that no other code can change, to build as many independent counters as you need with a factory function, and to make a function that runs only once.

Source: https://www.ask-codey.com/courses/javascript-in-depth/topics/javascript-closures
