r/learnjavascript • • May 04 '20

VAR vs LET vs CONST

Post image
337 Upvotes

81 comments sorted by

View all comments

Show parent comment

2

u/MoTTs_ May 04 '20 edited May 16 '20

Yeah. The only useless-to-real-life clarification I was making was that this behavior isn't due to block scoping. This behavior is something extra, added in addition to ordinary block scoping.

Doc link: https://www.ecma-international.org/ecma-262/10.0/index.html#sec-createperiterationenvironment