var i = 0; eval(new Array(101).join('alert(++i);')); var i = 0; new Function(new Array(101).join('alert(++i);'))();
解釋: 1、string.replace(regexp, replacement): replacement可以是function. In this case, the function is invoked for each match, and the string it returns is used as the replacement text.
javascript使用eval或者new Function進行語法檢查詳解new function(){}和function(){}() 區別分析function, new function, new Function之間的區別Eval and new funciton not the same thing