I have some JavaScript function definitions stored in a string.
"function firstFun() {
return 'some text';
}
function secondFun() {
console.log(firstFun())
}"
Is it possible to access and call these functions like any other function? Like:
var text = firstFun(); // return 'some text'
secondFun(); // print 'some text'
evalor parse the string by yourself. However, I would strongly recommend to reconsider your design.