function f(){ console.log('I am outside!');}(function (){ if (false){ function f(){ console.log('I am inside!'); } } f();}())看的是阮一峰老师的《ES6标准入门》块级作用域部分,书上说会输出‘I am outside!’可是实际上浏览器报错 test.html:25 Uncaught TypeError: f is not a function at test.html:25 at test.html:26
添加回答
举报
0/150
提交
取消
