if/etc语句中的函数声明?
var abc = '';if(1 === 0){ function a(){ abc = 7; }}else if('a' === 'a'){ function a(){ abc = 19; }}else if('foo' === 'bar'){ function a(){ abc = 'foo'; }} a();document.write(abc); //writes "foo" even though 'foo' !== 'bar'
foo
19
.
慕盖茨4494581
人到中年有点甜
相关分类