update one code comment in 1-js/09-classes/04-private-protected-properties-methods
It looks like code was changed some time ago, but comments didn't change accordingly.
This commit is contained in:
parent
29f0121b1c
commit
de36d0dffb
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ class CoffeeMachine {
|
||||||
let coffeeMachine = new CoffeeMachine(100);
|
let coffeeMachine = new CoffeeMachine(100);
|
||||||
|
|
||||||
// add water
|
// add water
|
||||||
coffeeMachine.waterAmount = -10; // Error: Negative water
|
coffeeMachine.waterAmount = -10; // _waterAmount will become 0, not -10
|
||||||
```
|
```
|
||||||
|
|
||||||
Now the access is under control, so setting the water amount below zero becomes impossible.
|
Now the access is under control, so setting the water amount below zero becomes impossible.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue