From e3c01aee2ee757ecb492f4a8ef2cc24be88ebf7b Mon Sep 17 00:00:00 2001 From: LoliPix Date: Tue, 11 Aug 2026 21:08:18 +0800 Subject: [PATCH] Return this in setWaterAmount method Add return statement to setWaterAmount method. --- .../04-private-protected-properties-methods/article.md | 1 + 1 file changed, 1 insertion(+) diff --git a/1-js/09-classes/04-private-protected-properties-methods/article.md b/1-js/09-classes/04-private-protected-properties-methods/article.md index 4396358d5..90ec94dee 100644 --- a/1-js/09-classes/04-private-protected-properties-methods/article.md +++ b/1-js/09-classes/04-private-protected-properties-methods/article.md @@ -163,6 +163,7 @@ class CoffeeMachine { *!*setWaterAmount(value)*/!* { if (value < 0) value = 0; this._waterAmount = value; + return this; } *!*getWaterAmount()*/!* {