You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/09-classes/04-private-protected-properties-methods/article.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -322,7 +322,7 @@ Hiding complexity
322
322
323
323
**It's always convenient when implementation details are hidden, and a simple, well-documented external interface is available.**
324
324
325
-
To hide internal interface we use either protected or public properties:
325
+
To hide internal interface we use either protected or private properties:
326
326
327
327
- Protected fields start with `_`. That's a well-known convention, not enforced at the language level. Programmers should only access a field starting with `_` from its class and classes inheriting from it.
328
328
- Private fields start with `#`. JavaScript makes sure we only can access those from inside the class.
0 commit comments