I have a problem. I want that in a function a variable is set and that is exported by another function as i don't want to return that variable at the invocation of function. How can i do this. Code look like this.
var details = {};
module.exports.set = function (var1){
details.n = var1;
}
module.exports.m = details.n;
But details.n is returning undefined. I know it is because of var details = {}. Then how can i resolve my purpose. Thanks in advance.