Update article.md

This commit is contained in:
Ilya Kantor 2020-12-05 22:16:42 +03:00 committed by GitHub
parent 08cc593cab
commit 6daaaa224f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,6 +96,7 @@ class CoffeeMachine {
_waterAmount = 0;
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");
this._waterAmount = value;
}