Quantcast
Viewing latest article 15
Browse Latest Browse All 35

Private properties in ES6 -- and ES3, and ES5

JavaScript famously lacks private properties on objects. The next version will have them (more on that below), but we can have most of the benefits of the upcoming improvement right now (without resorting to the usual hidden variables in the constructor), even on older engines. In this post, I look at what's coming, and what we can do now. "But wait," I hear you say, "Don't we already know how to

Viewing latest article 15
Browse Latest Browse All 35

Trending Articles