JavaScript Closures and the Module Pattern

Author: 
Published: April 30, 2012
Link: http://www.joezimjs.com/javascript/javascript-closures-and-the-module-pattern/
Excerpt: “One of the most widely used design patterns in JavaScript is the module pattern. The module pattern makes use of one of the nicer features of JavaScript – closures – in order to give you some control of the privacy of your methods so that third party applications cannot access private data or overwrite it. In this post I’ll teach you what a closure is, how it works, and how to utilize it to implement the module pattern in your own JavaScript code.”

Tagged with:
Posted in Javascript

Categories