반응형
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
- Git
- 리눅스
- 네트워크
- til
- js
- 기록
- CS
- Java
- 코테
- Grafana
- next.js
- 생각일기
- 회고
- 알고리즘
- 자바스크립트
- nest.js
- 생각로그
- 생각정리
- typescript
- 트러블슈팅
- mongo
- react
- MongoDB
- javascript
- 주간회고
- mongoose
- mysql
- 피드백
- array
- WIL
Archives
- Today
- Total
목록OOP (1)
코딩일상

절차지향 프로그래밍 { type CoffeeCup = { shots: number; hasMilk: boolean; }; const BEANS_GRAMM_PER_SHOT: number = 7; let coffeeBeans: number = 0; function makeCoffee(shots: number): CoffeeCup { if (coffeeBeans < shots * BEANS_GRAMM_PER_SHOT) { throw new Error("Not enough coffee beans!"); } coffeeBeans -= shots * BEANS_GRAMM_PER_SHOT; return { shots: shots, hasMilk: false, }; } coffeeBeans = 3 * BEANS_GRA..
기록/TIL(Today I Learned)
2022. 11. 2. 14:03