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
- set
- extends
- 상속
- async
- reactnative
- 이진탐색
- 글또10기x코드트리
- supabase auth
- code-push-standalone
- app.post
- supabase authentication
- map
- 페이지네이션
- array
- generic
- codepush
- 타입스크립트
- meatadata
- xlsx-js-style
- 슬라이딩윈도우
- Spring
- Filter
- 스크롤이벤트
- javascript
- supabase 페이지네이션
- 코드푸시
- Next.js
- interface
- TS
- react
Archives
- Today
- Total
목록bind (1)
rhanziy
javascript. Arrow Function의 this 바인딩(펌)
일반 함수는 함수를 선언할 때 this에 바인딩할 객체가 정적으로 결정되는 것이 아니고, 어떻게 호출 되었는지에 따라 this 에 바인딩할 객체가 동적으로 결정되었다. 하지만 ES6의 Arrow Function은 함수를 선언할 때 this에 바인딩할 객체가 정적으로 결정된다. 화살표 함수는 자신의 this가 없다. 대신 화살표 함수가 둘러싸는 렉시컬 범위(lexical scope)의 this가 사용된다. 즉, 언제나 화살표 함수의 상위 스코프, 화살표 함수가 선언된 스코프의 this를 가리킨다. const name = 'rhan'; const rhanyi = { name: 'yi', getName: function () { console.log(this.name); }, }; rhanyi.getName(..
Html_css_js
2022. 2. 23. 16:30