Too Long; Didn't Read
In JavaScript, new instances of objects have a prototypal inheritance relationship with their parents and there is no such thing as private or protected properties. The ECMAScript Technical Committee is considering private class fields as a type of type type. JavaScript's hope yet for privacy in our JavaScript classes is that it will soon be able to designate private fields in our classes simply by simply naming them as private. I tried several ways but ultimately failed to (satisfactorily) achieve property privacy in JavaScript. I have a module that works but sacrifices some property and method privacy.
Share Your Thoughts