Which of the following correctly defines a tuple type in TypeScript?

TypeScript Associate Easy

TypeScript Associate — Easy

Which of the following correctly defines a tuple type in TypeScript?

Key points

  • Tuples are defined with square brackets
  • Elements in a tuple have specific types in a specific order
  • Tuples allow for fixed-length arrays with defined types

Ready to go further?

Related questions