Object Oriented Programming: Encapsulation

This is a short glossary entry on encapsulation. Encapsulation is a fancy word for data hiding. Data hiding is fancy talk for building code so that someone can just type English words to use it, lowering the chance that people use your code wrong.¹

Here’s an example in Javascript you can run right now:

Created in JSBin