Beginner
TypeScript
Q20 / 100
What is the correct syntax to create a tuple of a string and a number?
Correct! Well done.
Incorrect.
The correct answer is A) let pair: [string, number] = ["age", 25];
A
Correct Answer
let pair: [string, number] = ["age", 25];
Explanation
Tuples in TypeScript are written using square brackets with each element type in order, e.g. [string, number].
Progress
20/100