block-level scope
for (var i = 0; i < 10; i++) {
/* ... */
}
console.log(i); // what will this output?variable hoisting
let
letLast updated
for (var i = 0; i < 10; i++) {
/* ... */
}
console.log(i); // what will this output?letLast updated