
여러분은 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
- TS
- 제로초
- 회고
- Python
- 깃
- 스파르타코딩클럽
- Typescript
- vue
- javascript
- 자바스크립트
- vscode
- 드림코딩
- React
- 구름에듀
- 제이쿼리
- 비주얼스튜디오코드
- git
- map
- 김버그
- 파이썬
- 타입스크립트
- js
- Til
- scss
- 저스트코드
- 코드잇
- html
- 리액트
- CSS
- 코딩앙마
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함