Obect-Oriented Javascript: Creating and Using Private Data
Private data in objects is a trickier proposition in JavaScript than in most languages. Only the most recent spec (ES12) specifically addresses private data, so the way to hide it has until recently been to put it in a closure. … Continued