divied功能加入錯誤判斷

This commit is contained in:
Sabrina 2020-10-25 16:14:57 +08:00
parent c39c6f3bef
commit c5fe0f5268

View File

@ -12,6 +12,9 @@
}
function divide(a, b) {
if(b <= 0) {
throw 'b must be greater than0'
}
return a/b;
}