I found a little bit strange behavior in this code:
for (let i = 1; i < 2; i++) {
let i = 10;
console.log(i);
}
I expected it to throw Syntax Error, because of doubled declaration, but it works and prints 10. Maybe, somebody could explain? Why it is not the same environment and performs shadowing? Thanks