Community

How To: ‘Private’ In JavaScript (ES6) Classes

(Sean Franklin) While using JavaScript, you might be dearly missing our friend “private” from statically-typed languages like C#, C++, and Java. Using a little finesse, we can actually achieve true encapsulation using local variables in vanilla JavaScript (ES6) classes.




Facebooktwitterredditpinterestlinkedinmail