From c5fe0f52684db397d3305fe7a41d9e4b7cc5725f Mon Sep 17 00:00:00 2001 From: Sabrina Date: Sun, 25 Oct 2020 16:14:57 +0800 Subject: [PATCH] =?UTF-8?q?divied=E5=8A=9F=E8=83=BD=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E9=8C=AF=E8=AA=A4=E5=88=A4=E6=96=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.html b/index.html index 9717bef..712b89b 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,9 @@ } function divide(a, b) { + if(b <= 0) { + throw 'b must be greater than0' + } return a/b; }