Tuple (tuple)
An array with fixed length and types.
Syntax
let name: [type1, type2];
Description
The type and order of each position is fixed (e.g., [string, number]).
Example
Loading editor…
Expected output
Alex 36
When to use?
Fixed-structure pairs/triplets like name+age, coordinates.