Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- #cloudfront #s3 #html 확장자 없애기
- jest
- ESLint
- lightsail nodejs apache
- TypeScript
- git pair
- OOP
- NPM
- 클로저
- 객체참조 #객체
- this
- 기후변화
- url #querystring
Archives
- Today
- Total
목록this (1)
Hello World...
자바스크립트 this 5가지 패턴
자바스크립트 this 는 정말 헷갈리는 것 중 하나다. 그래도 5가지 패턴을 잘 기억하고 있으면, 공부에 도움이 많이 된다. console.log(this); var fun = function() { console.log(this); } ------------------------ 1. 전역 Global Reference : console.log(this); => window, global 2. 함수 호출 Free Function Invocation : fun(); => window, global 3. call, apply 호출 call or apply Invocation : fun.call(obj); fun.apply(obj) => first arg 4. 생성자 Construction Mode : ne..
javascript
2019. 12. 27. 14:03