Say I have a function in javascript
var fn = function () {
return 6 + 5;
};
and then I do
fn.toString();
which returns
"function () { return 6 + 5; }"
how can I turn this back into a function and eventually call it later on. I've tried eval
as other people have said but this does not seem to be working for me. Any help would be much appreciated!!!