Skip to content

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.

Where the book teaches it

Related terms

Scopevar