# Protected and friend access modifier for class members

**URL:** <https://es.discourse.group/t/protected-and-friend-access-modifier-for-class-members/732>\
**Category:** 💡 Ideas\
**Created:** [April 8, 2021, 2:58pm UTC](https://es.discourse.group/t/protected-and-friend-access-modifier-for-class-members/732 "2021-04-08T14:58:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ljharb](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/ljharb/32/8_2.png) [@ljharb](https://es.discourse.group/u/ljharb)\
**Post date:** [April 8, 2021, 3:35pm UTC](https://es.discourse.group/t/protected-and-friend-access-modifier-for-class-members/732/3 "2021-04-08T15:35:00Z")

</div>

JavaScript does not have access levels - something is either reachable/public or unreachable/private.

“protected’ doesn’t make sense in the language without a way to limit access to things that’s different from lexical scope, and that doesn’t require circular dependencies. The challenge for this concept isn’t the syntax or keyword used to denote it; it’s “what could the semantics possibly be”? I remain convinced that it’s not achievable in an ergonomic way.

---

_[View the full topic](https://es.discourse.group/t/protected-and-friend-access-modifier-for-class-members/732)._
