var a=1;
function foo(){
if(false){
var a=1;
}
console.log(a);
}
foo();
执行结果:undefined
若去除if语句,输出1
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!