Open eonj opened 11 years ago
As far as I know, eval("0") is 0. However, I must write "return 0;" instead of "0" when I want to get Number 0 for the return. Same for any expression like /0-9A-Za-z/g. If it is not intended, this is not an exact eval().
I suggest for eval:
[]["filter"]["constructor"]("return eval(CODE)")()
As far as I know, eval("0") is 0. However, I must write "return 0;" instead of "0" when I want to get Number 0 for the return. Same for any expression like /0-9A-Za-z/g. If it is not intended, this is not an exact eval().
I suggest for eval: