[문제] VariableEnvironment VS LexicalEnviroment의 차이는 무엇인가요?
live-small opened this issue · comments
Pur commented
질문
실행컨텍스트 컴포넌트인 VariableEnvironment
LexicalEnviroment
의 차이가 궁금합니다.
상세내용
[23장 p367]
생성초기에 두 컴포넌트는 하나의 동일한 렉시컬 환경을 참조한다. 이후 몇 가지 상황을 만나면
VariableEnvironment
컴포넌트를 위한 새로운 렉시컬 환경을 생성하여, 이때부터 두 컴포넌트의 내용이 달라지는 경우도 있다.
해당 책은 두 컴포넌트를 구분하지 않고 렉시컬 환경으로 통일해 간략히 설명했는데요,
두 컴포넌트의 차이점이 궁금합니다.
관련 챕터
23장 p367
참고
Link commented
let and const declarations define variables that are scoped to the running execution context's LexicalEnvironment
in ECMAScript Specification