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