Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- 알고리즘
- html
- 인접리스트
- bean
- 인접행렬
- OOP
- REST API
- logger
- typescript
- Spring
- javascript
- 코딩테스트
- 자료구조
- nestjs
- MySQL
- Interceptor
- Deep Dive
- java
- winston
- dfs
- LifeCycle
- TIL
- GraphQL
- 탐욕법
- 프로그래머스
- queue
- JWT
- css
- 변수
- node.js
Archives
- Today
- Total
목록closure (1)
처음부터 차근차근
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bbtCpM/btsjHdzCPMU/ntLfZb9KYlgw0lp9yeLtRk/img.jpg)
Closure에 대한 정의 : A closure is the combination of a function and the lexical environment within which that function was declared(클로저는 함수와 그 함수가 선언된 렉시컬 환경과의 조합니다.) - MDN 이걸 알기 위해서는 함수가 선언된 렉시컬 환경에 대하여 자세하게 알 필요가 있다. 아래의 예시를 보자. const x = 1; function outerFunc() { const x = 10; function innerFunc() { // x는 어디서 참조할까요?? // 함수가 선언된 렉시컬 환경!!! // 함수가 선언될 당시의 외부 변수 등의 정보! console.log(x); // 10 } innerFu..
Language/JavaScript
2023. 6. 12. 22:00