Intermediate
TypeScript
Q71 / 100
What does the spread operator do when used with TypeScript tuples, e.g. "type T = [number, ...string[]]"?
Correct! Well done.
Incorrect.
The correct answer is B) It defines a tuple with a fixed first element of type number followed by zero or more strings
B
Correct Answer
It defines a tuple with a fixed first element of type number followed by zero or more strings
Explanation
Rest elements in tuple types allow a fixed prefix followed by a variable number of elements of a specified type.
Progress
71/100