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 |
Tags
- 카카오
- 스프링 컨테이너
- 개발자 회고록
- 백준 javascript
- 명령어
- map
- 자바
- 리눅스
- GoingBus
- 자바스크립트 코딩의 기술
- toCharArray
- 월간코드챌린지
- JavaScript
- Java
- 리눅스마스터 1급 정리
- 리눅스마스터1급
- 고잉버스
- 스프링 빈
- 문자열
- Linux
- Memoir
- 백준 java
- 리눅스마스터 3과목
- 코테
- java 백준 1차원 배열
- 코딩테스트
- 연습문제
- 반복문
- 프로그래머스
- Kotlin
Archives
- Today
- Total
728x90
목록 javascript generator (1)
728x90
728x90
hoon DevLog
8장 클래스로 인터페이스를 간결하게 유지하라 tip40. get과 set으로 인터페이스를 단순하게 만들어라 이전 팁에서 사용한 코드를 활용하여, 클래스는 아래 코드처럼 속성에 접근하여 변경도 가능하다. class Coupon { constructor(price, expiration) { this.price = price; this.expiration = expiration || '2주'; } getPriceText() { return `$ ${this.price}`; } getExpirationMessage() { return `이 쿠폰은 ${this.expiration} 후에 만료됩니다.`; } } const coupon = new Coupon(5); coupon.price = '$10'; coupon..
IT/Javascript
2024. 2. 29. 09:23