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.
1 parent 29f0121 commit de36d0dCopy full SHA for de36d0d
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