2 ms·
Why would there be a whole new scope for every declaration, instead of just each block? To prevent access within the block but before the declaration?
by brundolf 6y ago
Why would there be a whole new scope for every declaration, instead of just each block? To prevent access within the block but before the declaration?
- nightcracker 6y agoProbably was simplest to implement, and then not looked at again.
- winstonewert 6y agoYes, I think creating a new scope for every let/const would be the simplest (but not very efficient) way to accomplishing that.