Fix a mistake
This commit is contained in:
parent
9b5c1c95ec
commit
5e7a370476
1 changed files with 1 additions and 1 deletions
|
@ -322,7 +322,7 @@ Hiding complexity
|
|||
|
||||
**It's always convenient when implementation details are hidden, and a simple, well-documented external interface is available.**
|
||||
|
||||
To hide internal interface we use either protected or public properties:
|
||||
To hide internal interface we use either protected or private properties:
|
||||
|
||||
- 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.
|
||||
- Private fields start with `#`. JavaScript makes sure we only can access those from inside the class.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue