# Implementing Private and Protected Members in JavaScript

DevFeed: [Implementing Private and Protected Members in JavaScript](<https://devfeed.tech/articles/implementing-private-and-protected-members-in-javascript-29509.md>)

Original publisher: [Read original article](<https://philipwalton.com/articles/implementing-private-and-protected-members-in-javascript/>)

Published: 2014-04-10T03:59:27Z

Content type: tutorial

Language: en

Sources: [Philip Walton](<https://devfeed.tech/sources/philip-walton.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [developers](<https://devfeed.tech/tags/developers.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [privacy](<https://devfeed.tech/tags/privacy.md>)

## AI overview

This article examines JavaScript privacy, explaining the limitations of underscore-based conventions and the inability to make object properties private. It presents ideas for implementing private and protected members with less ceremony.

## Source excerpt

Privacy has been a complicated issue throughout JavaScript's history. While it's always been possible to meet even the most stringent privacy needs (the myriad of compile-to-js languages proves this), the extraneous ceremony required to really do it right is often too much of a turn-off for most developers -- especially to those coming from other languages where privacy is built in.