Trying hard to replace the eval without using Function constructor. Stumped. I am not a newbie but not an expert either.
jslint says this is evil; when I replaced it with a Function constructor, it said that was just a form of eval()!
   evaluateEventScript: function(requestObject) {
        var resultData;
        resultData = eval(requestObject.script);
        /开发者_JAVA百科/send resultData elsewhere...
   }
Help??
Can't you simply pass a function object in your scenario? e.g
var c = function(){
   ...
}
var evaluateEventScript = function(requestObject) {
    var resultData;
    resultData = requestObject();
    //send resultData elsewhere...
}
evaluateEventScript(c);
Or something in this form? this can work without eval or Function constructor. but it requires the requestObject to be a function object, and not a String.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论