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