Javascript 101: Closures

What is a Scope

Variable binding

Understanding Closures

Module pattern: A Practical approach to Closures

Closures are used by the module pattern (a design principle in Javascript that aids in writing cleaner code) to achieve the encapsulation of private state(An uncommon trait in Javascript).


Woo!! That was a lot to digest. If you didn't nod off during your read then you should be confident enough to explain Closures to any inquirer. For further study, please do consult this material. Thanks for staying tuned 👋


You Don’t Know JS: Scope & Closures



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ewere Ebie

Ewere Ebie

I write because it’s less exhausting than speaking and it allows me communicate my passions the best way I know how.