Skip to content

Commit

Permalink
feat(javascript): 호이스팅 문서 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
eunbae0 committed Feb 17, 2024
1 parent cd7fb9d commit 223ab58
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/basics/javascript/hoisting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 호이스팅

자바스크립트 엔진이 식별자들(변수)을 최상단으로 끌어 올려놓은 다음 실제 코드를 실행하기 때문에 발생하는 현상.
즉, 동기적으로 코드를 실행시키기 전, 선언된 식별자들을 맨 위로 끌어올려 실행하게 된다.

일부에서는 let, const 및 class를 호이스트되지 않는 것처럼 보이지만, 그 이유는 TDZ(temporal dead zone)가 선언 이전의 변수 사용을 엄격하게 금지하고 있기 때문이다.

## 변수 호이스팅

### var

### let, const

## 함수 호이스팅

## class 호이스팅

0 comments on commit 223ab58

Please sign in to comment.