A closure is a function bundled together with references to the variables from its surrounding (lexical) scope. Because of closures, an inner function keeps access to its outer function's variables even after the outer function has returned.
js
() {
count = ;
{
: ++count,
: count,
};
}
a = ();
b = ();
a.(); a.();
b.();
