Update article.md
This commit is contained in:
parent
08cc593cab
commit
6daaaa224f
1 changed files with 1 additions and 0 deletions
|
@ -96,6 +96,7 @@ class CoffeeMachine {
|
||||||
_waterAmount = 0;
|
_waterAmount = 0;
|
||||||
|
|
||||||
set waterAmount(value) {
|
set waterAmount(value) {
|
||||||
|
// "throw new Error" generates an error, we'll cover it later in the tutorial
|
||||||
if (value < 0) throw new Error("Negative water");
|
if (value < 0) throw new Error("Negative water");
|
||||||
this._waterAmount = value;
|
this._waterAmount = value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue