Is there a way to call a function that is stored as a string? For example:
var dynamicFun = `function Hello(person) { return 'Hello' + person; }`
In this case, the dynamicFun variable can store any function definition dynamically, such as:
var dynamicFun = `function Sum(num) { return num + num; }`
During compile time, I am not aware of which function definition is assigned to the dynamicFun variable. It gets assigned at runtime. So how can I call these functions using the dynamicFun variable with parameters (without knowing the actual function name or definition) in JavaScript/TypeScript?