by zamalek · 8y ago · 0 comments
The "safe" and fast way to use eval for JIT is to get it to return a function, with all user inputs as parameters (like like the safe and fast way to do SQL is with parameters):
var f = eval("(function (a, b) { return a + b })");
f("a", "b");