标签:ann ati access bar 函数 cannot 作用域 OLE let
for(var i=0;i<5;i++){
console.log(i);
}
console.log("最后的i是"+i);//5
for(let i=0;i<5;i++){
console.log(i);
}
console.log("最后的i是"+i);//i is not defined
console.log(bar);//undefined
var bar="foo";
console.log(bar);// Cannot access ‘bar‘ before initialization
let bar="foo";
标签:ann ati access bar 函数 cannot 作用域 OLE let
原文地址:https://www.cnblogs.com/czmwww/p/14584233.html