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:
Z Yin 2021-06-18 13:18:05 -04:00 committed by GitHub
parent 29f0121b1c
commit de36d0dffb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,7 +116,7 @@ class CoffeeMachine {
let coffeeMachine = new CoffeeMachine(100);
// 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.