Hi,
Is there a more efficient way [than eval()] to evaluate a string to its value?
eval() is quite time consuming [calls take about three times longer] and I use it a lot.
If there is no better way, is it possible to populate an array with function names? I can do that once, than call the function from the array instead.
Ex:
var abcMx = new Array();
in main
abcMX[0] = abcM0;
abcMx[1] = abcM1;
etc.
where abcM0, abcM1 are function names, not real values.
Should something like that work?
Note: This is related to an earlier post, which it has been cancelled [before I implemented the eval thing].
Thank you
Is there a more efficient way [than eval()] to evaluate a string to its value?
eval() is quite time consuming [calls take about three times longer] and I use it a lot.
If there is no better way, is it possible to populate an array with function names? I can do that once, than call the function from the array instead.
Ex:
var abcMx = new Array();
in main
abcMX[0] = abcM0;
abcMx[1] = abcM1;
etc.
where abcM0, abcM1 are function names, not real values.
Should something like that work?
Note: This is related to an earlier post, which it has been cancelled [before I implemented the eval thing].
Thank you
Comment