
여러분은 string[]과 [string]이 다른 것이라는 사실을 알고 계십니까...? 오늘 ChatGPT에게 물어보며 문제를 해결하던 중 새로운 개념을 발견했다. [string] is a tuple type with a single element of type string, while string[] is an array type that can have zero or more elements of type string. const tuple: [string] = ["hello"]; // valid const array: string[] = ["world"]; // valid const anotherTuple: [string] = []; // error: expects exactly one elemen..
TIL
2023. 4. 5. 23:12
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 타입스크립트
- Til
- CSS
- 깃
- js
- React
- 드림코딩
- 회고
- Typescript
- html
- 비주얼스튜디오코드
- 리액트
- 코딩앙마
- 제이쿼리
- vscode
- scss
- git
- 제로초
- map
- 자바스크립트
- 저스트코드
- Python
- 코드잇
- 스파르타코딩클럽
- javascript
- vue
- 구름에듀
- TS
- 김버그
- 파이썬
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함