This sounds like preliminary question but I am unable to figure out a work around. I prefer not to use eval(). Below is my code
var inputValue = 75;
var functionName = 'Math.Sin';
alert (functionName(inputValue));
My intent is to calculate the Mathematical Value of functionName(inputValue). Both functionName and inputValue are stored in strings (current setup id designed so and I cannot alter that). functionName and inputValue are variables and their content will change based on context.
Can I get a suggestion on how to calculate value?