Skip to content

Commit de36d0d

Browse files
authored
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.
1 parent 29f0121 commit de36d0d

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

118118
// add water
119-
coffeeMachine.waterAmount = -10; // Error: Negative water
119+
coffeeMachine.waterAmount = -10; // _waterAmount will become 0, not -10
120120
```
121121

122122
Now the access is under control, so setting the water amount below zero becomes impossible.

0 commit comments

Comments
 (0)