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