UNPKG

sagar-node-app

Version:

Sample nodeJS application created as part of NodeJS training 1st program

21 lines (17 loc) 290 B
function add(a,b){ return a+b; } function sub(a,b){ return a-b; } function mul(a,b){ return a*b; } function divide(a,b){ if(b===0) throw new Error("You cannot divide using zero"); return a/b; } module.exports={ add, mul, sub, divide }