An array is a numbered sequence of elements of a specific length. The length is part of the array's type, so arrays cannot be resized. This makes them less common than Slices.
When you need a fixed-size buffer or lookup table.
Declaring and initializing arrays.
var a [2]string
a[0] = "Hello"
a[1] = "World"
primes := [6]int{2, 3, 5, 7, 11, 13}
fmt.Println(primes)
Use arrays mostly as building blocks for slices. In 99% of app code, use Slices.