Fixed-Length Tuples
π¨βπΌ Perfect! Tuples work great for coordinates.
π¦ Notice how destructuring makes tuple usage clean:
function formatCoordinate([lat, long]: [number, number]): string {
return `Lat: ${lat}, Long: ${long}`
}
The tuple type guarantees exactly two numbers, and destructuring gives them
meaningful names.