loading...

re: Declaring JS Variables in 2019 VIEW POST

TOP OF THREAD FULL DISCUSSION
re: You also need to remember that let and const have block scope: let i = 0; console.log(1,i); if(i===0){ let i = 1; console.log(2,i) } console...
 

Actually, not mentioning this was one of the goals of my article. I think this behavior, for new programmers, is logically the most sensible!

(Having a comment pointing it out is fine though 😅)

code of conduct - report abuse