TypeScript tutorialLesson 8Free preview
TS Tuples
This lesson is part of TypeScript · All levels
Summary
A Tuple is an array with a fixed length and type at each position. Each index has its own type so that mixed data such as text pairs and numbers remain secure. TypeScript also supports optional elements and tuple readonly.
Key points
- Each tuple position has a fixed type
- Optional elements marked with question mark
- Readonly tuple cannot be changed
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.