I want to know if it is possible to run a function called string in nodejs. All this code works on the server side without visible browser visibility.
Assuming I'm exporting a file test.jswith the following code
module.exports.test = function(x)
{
console.log(x*5);
}
Can I do it somehow?
main.js
imp = require('test.js');
toExecute = "test";
// somehow call imp.test using toExecute`
source
share