Private JavaScript variables with the Module Pattern
In the previous article, we’ve talked about closures which are the building stone for anything even remotely complex in JavaScript. This time, we’ll take a look at private variables.
JavaScript itself doesn’t have the concept of a private or public variable, everything is public. But there’s a way around this. Let’s take a look at our previous example