Answers for "Example: Export a function in Node"

1

Example: Export a function in Node

function add(a,b){
return a + b;
}

function sub(a,b){
return a - b;
}

function mul(a,b){
return a * b;
}

function div(a,b){
return a / b;
}

exports.add = add
exports.sub = sub
exports.mul = mul
exports.div = div
Posted by: Guest on June-15-2021

Code answers related to "Example: Export a function in Node"

Browse Popular Code Answers by Language