We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ffe91a6 + de36d0d commit 8558fa8Copy full SHA for 8558fa8
1-js/09-classes/04-private-protected-properties-methods/article.md
@@ -116,7 +116,7 @@ class CoffeeMachine {
116
let coffeeMachine = new CoffeeMachine(100);
117
118
// add water
119
-coffeeMachine.waterAmount = -10; // Error: Negative water
+coffeeMachine.waterAmount = -10; // _waterAmount will become 0, not -10
120
```
121
122
Now the access is under control, so setting the water amount below zero becomes impossible.
0 commit comments