rishu-node-app
Version:
Sample node js application
21 lines (20 loc) • 386 B
JavaScript
exports.add=function(a,b)
{
return a+b;
}
exports.sub=function(a,b)
{
return a-b;
}
exports.mul=function(a,b)
{
return a*b;
}
exports.div=function(a,b)//this type of exports in done only for function and object.. not for class....remember this things...
{
if(b===0)
throw new Error("can not be divide by 0");
return a/b;
}
module.exports={
}