I want to know how can i turn string into a wrap function.
I have a string function data
var a = new String("alert(turned)");
And I want to turn a into a wrapped function
a = function(){ a }; // failed
a = function(){ eval(a) }; // failed
var b = a;
a = function(){ eval(b) } // success
I want to know what do people will do in general to turn a into a wrapped function.
Thank you very much for your advice.