These examples shows to JavaScript programmers coming from standard OOP languages how to achieve encapsulation in JavaScript.
To try these examples, just download the gist on your local computer and open the .html files.
Alternatively, you can play with these examples online via jsbin.com: