Multidimensionality

This lesson discusses how to handle multidimensional sequences of data in Go.

Multidimensional arrays

Arrays are always 1-dimensional, but they may be composed to form multidimensional arrays, like:

[3][5]int
[2][2][2]float64

The inner arrays always have the same length. Go’s multidimensional arrays are rectangular. Here is a code snippet which uses such an array:

Get hands-on with 1400+ tech skills courses.