Skip to content

Commit 6daaaa2

Browse files
authored
Update article.md
1 parent 08cc593 commit 6daaaa2

File tree

1 file changed

+1
-0
lines changed
  • 1-js/09-classes/04-private-protected-properties-methods

1 file changed

+1
-0
lines changed

1-js/09-classes/04-private-protected-properties-methods/article.md

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ class CoffeeMachine {
9696
_waterAmount = 0;
9797

9898
set waterAmount(value) {
99+
// "throw new Error" generates an error, we'll cover it later in the tutorial
99100
if (value < 0) throw new Error("Negative water");
100101
this._waterAmount = value;
101102
}

0 commit comments

Comments
 (0)