nillworld / frontEndStudy

0 stars 0 forks source link

frontEndStudy

테스트 문서 내부 링크 lexical Scoping

lexical-Scoping

Lexical scoping (sometimes known as static scoping ) is a convention used with many programming languages that sets the scope (range of functionality) of a variable so that it may only be called (referenced) from within the block of code in which it is defined. The scope is determined when the code is compiled. A variable declared in this fashion is sometimes called a private variable.

https://whatis.techtarget.com/definition/lexical-scoping-static-scoping

"lexical"이란, 어휘적 범위 지정(lexical scoping) 과정에서 변수가 어디에서 사용 가능한지 알기 위해 그 변수가 소스코드 내 어디에서 선언되었는지 고려한다는 것을 의미한다. 단어 "lexical"은 이런 사실을 나타낸다. 중첩된 함수는 외부 범위(scope)에서 선언한 변수에도 접근할 수 있다.

https://developer.mozilla.org/ko/docs/Web/JavaScript/Closures