Need Assistance?

support@tutorialshub.in

Core Types & Special Types

Arrays, Tuples & Readonly Arrays

ADVERTISEMENT
TypeScript Free Lesson
5 min read
ADVERTISEMENT

Type arrays using string[] (or Array<string>). When you need a fixed-length array where each position has a specific type (like [id, name]), use a Tuple. Prefix with readonly when an array should never be mutated.

ADVERTISEMENT
Hi, I'm Tuby! Here to help you