re: Emulating "Private" Variables in JavaScript with Closures and Factory Functions VIEW POST


Despite the recent implementation of classes in JavaScript, there has never been a native way of controlling the visibility of an object's property.

Soon: Stage 3 proposal for private fields, available already in Babel.

code of conduct - report abuse