| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- Clone
- security
- C++
- vuetify
- vue.js
- webpack
- git
- var
- machine learning
- dotenv
- 보안
- BOJ
- C#
- Python
- scss
- generic
- docker
- 앙상블
- VUE
- leetcode
- AI
- TypeScript
- type
- nginx
- npm
- loop
- condition
- bash
- JavaScript
- property
Archives
- Today
- Total
목록class (1)
ice rabbit programming
[JS][TS] Typescript에서의 Class
지난 글에서 인터페이스에 대해 다루었다. 이번 글에서는 객체지향의 가장 중요한 개념 중 하나인 클래스를 다룰 것이다. C++이나 C#에서의 Class 사용법과 비슷하다. 관례적으로 한 파일에 한 클래스를 사용하는 것도 비슷하다. 아래 class 작성 예시를 보면서 차이점을 보도록 하자. class Person { private _age: number // 관례적으로 private 변수에는 _ 를 붙인다. public name: string = 'ice' // class 내에서 초기화 가능 address: string // default가 public이다. static country: string = 'Korean' // 전역으로 사용 가능 constructor(name: string, age: numbe..
Development/JavaScript
2020. 12. 26. 22:52