Skip to content

Glossary: Algorithms Beyond the Basics in JavaScript

Closure

Also written: closures

A function that remembers the variables from where it was created, even after the outer function has finished. The function returned by `memoize` keeps using its own `memo` Map this way.

Where the book teaches it

Related terms

Memoization