if (true) {
function test() {
console.log(true);
}
} else {
function test() {
console.log(false);
}
}
test()
Chrome 48 (and node <5.9.1) logs false, chrome 49 (and firefox) log true. I think they are optimized without rising from a fake branch, but they can disrupt existing applications.
Which one is correct by specification?
source
share