> For the complete documentation index, see [llms.txt](https://april.gitbook.io/learning-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://april.gitbook.io/learning-js/chapter-7./7.4.md).

# 7.4 블록 스코프

* let, const 는 식별자를 블록 스코프에 선언함
* 블록 스코프는 그 블록의 스코프에서만 보이는 식별자를 의미함

```javascript
console.log('before block');
{
    console.log('inside block');
    const x = 3;
    console.log(x); // 3
}

console.log('outside block; x = ' + x); // ReferenceError: x는 정의되지 않았습니다.
```
