Skip to content

Commit f80dc03

Browse files
authored
Fix extending of class (#1363)
Fix extending of class
2 parents 4745f44 + fd4d2f0 commit f80dc03

File tree

1 file changed

+1
-1
lines changed
  • 1-js/09-classes/04-private-protected-properties-methods

1 file changed

+1
-1
lines changed

1-js/09-classes/04-private-protected-properties-methods/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Unlike protected ones, private fields are enforced by the language itself. That'
248248
But if we inherit from `CoffeeMachine`, then we'll have no direct access to `#waterAmount`. We'll need to rely on `waterAmount` getter/setter:
249249

250250
```js
251-
class MegaCoffeeMachine extends CoffeeMachine() {
251+
class MegaCoffeeMachine extends CoffeeMachine {
252252
method() {
253253
*!*
254254
alert( this.#waterAmount ); // Error: can only access from CoffeeMachine

0 commit comments

Comments
 (0)