var a,b,c; (function(){ eval('var b = 2'); (1, eval)('var c = 3'); (new Function('var a = 4'))(); document.write('<br>a: ' + a); document.write('<br>b: ' + b); document.write('<br>c: ' + c); })()document.write('<br>a: ' + a);document.write('<br>b: ' + b);document.write('<br>c: ' + c);
执行此段代码后,得到如下结果
a: undefinedb: 2c: 3a: undefinedb: undefined c: 3
http://codepen.io/quietcoder/...
噜噜哒
相关分类