✳flâneur — a map of the web's best reading
What the fuck is a closure? ・ Dan’s JavaScript Glossary
whatthefuck.is · 1,818 words · saved by 1 readers
Dan’s JavaScript Glossary
Closures are confusing because they are an “invisible” concept. When you use an object, a variable, or a function, you do this intentionally. You think: “I’m gonna need a variable here,” and add it to your code. Closures are different. By the time most people approach closures, they have already used them unknowingly many times — and it is likely that this is true for yourself, too. So learning closures is less about understanding a new concept and more about recognizing something you have already been doing for a while. tl;dr You have a closure when a function accesses variables defined outsi
Explore this link on the map →saved by
related reading
- Closures - The Rust Programming Languagedoc.rust-lang.org
- Functions — reusable blocks of code - Learn web development | MDNdeveloper.mozilla.org
- A half-hour to learn Rustfasterthanli.me
- Scope (computer programming) - Wikipediaen.wikipedia.org
- how I think when I think about programming - alice mazalicemaz.com
- Hooks, Dependencies and Stale Closurestkdodo.eu
- Python Scope and the LEGB Rule: Resolving Names in Your Code – Real Pythonrealpython.com
- Functions · Crafting Interpreterscraftinginterpreters.com
- CoffeeScriptcoffeescript.org
- Resolving and Binding · Crafting Interpreterscraftinginterpreters.com
- 9. Classes — Python 3.14.6 documentationdocs.python.org
- Learnable Programmingworrydream.com