I want to call function A to function B.
I already tried to call function A from function B
module.exports = function(req, res) {
return {
function_a: function() {
// do something here
},
function_b: function() {
// call function_a
const A = function_a(); // I want to be called something like this
// do something here
}
}
}
I expect function A to be called inside function B
module.exports = function(req, res) {then when you do thisfunction_a: function() { // do something here },