2 ms·
JavaScript Closures in One Sentence
From MDN:
"Closures are functions that refer to independent (free) variables. In other words, the function defined in the closure 'remembers' the environment in which it was created."
Wow!
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures
- deleted 11y ago[deleted]