在 Chrome 和 Firefox 中运行它会给出不同的答案:
(function() {
if(true) {
function f() { alert("yes"); };
} else {
function f() { alert("no"); };
}
f();
})();
在 Chrome 中,结果为“否” 在 Firefox 中,结果为“是”
为什么有区别?