diff --git a/index.js b/index.js index 713abd2..ecb9b0d 100644 --- a/index.js +++ b/index.js @@ -2,10 +2,11 @@ function add(a ,b){ return a + b } function sub(a, b){ - if(!(a>b)) throw new error (" no . a must be greater than b") + if(!(a>b)) throw new Error (" no . a must be greater than b") return a-b } function multi (a,b){ + if (a<0 || b<0) throw new Error ("no a , b must be positive") return a*b } @@ -18,3 +19,5 @@ mul(1 ,8) mul(4, 5) mul(6,8) mul(78,90) +mul(8,9) +mul(78,98)