Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyTypeScriptarrays and tuplesSingle-choice MCQ

What does the `?` do in this tuple type, and which assignments are valid?

type Point = [number, number, number?]; const p1: Point = [1, 2]; const p2: Point = [1, 2, 3]; const p3: Point = [1];