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
- eas
- ES5
- expo
- innerText
- Review
- snyk
- node
- eas build
- Dom
- 앱 시장 조사
- textContent
- UI
- 빌드 전 점검
- react
- innerHTML
- Event
- yet
- modal
- Empty
- javascript
- HTML
- addEventListener
- CSS
- a11y
- es6
- 커스텀 테마
- 앱 마케팅 전략
- js
- node.js
- nodeValue
Archives
- Today
- Total
the murmurous sea
JS OOP: 본문
class Person {
constructor (name, first, second) {
this.name = name;
this.first = first;
this.second = second;
}
}
const Kim = new Person(Kim, 10, 20);
console.log('Kim:', Kim);
위의 코드처럼 const나 let을 사용하면 temporal dead zone에 있게 되어 코드를 실행할 수 없음
class와 const/let 모두 ES6에서 새로 추가된 기능인데, 왜 같이 사용할 수 없지...? 어떻게 해야 같이 사용할 수 있지?
'#dev > undone Q' 카테고리의 다른 글
async vs. fetch (0) | 2020.06.25 |
---|---|
RegExp (0) | 2020.06.24 |
JS ES6: Promise vs. Async await (0) | 2020.06.15 |
JS ES5: strict / non-strict(sloppy) mode (0) | 2020.06.10 |
(Q)Is null a primitive data type in JS? (0) | 2020.06.03 |
Comments