Glossary: JavaScript Beyond the Basics
Block scope
Also written: block
A `let` or `const` declared inside a block, the code between a pair of braces, exists only inside that block. This applies to `if` statements and loop bodies.
Glossary: JavaScript Beyond the Basics
Also written: block
A `let` or `const` declared inside a block, the code between a pair of braces, exists only inside that block. This applies to `if` statements and loop bodies.