Skip to content

Bit #45

When creating an array in Go, we can put ... in place of array’s length to determine the length of the array automatically based on the number of elements provided.

nums := [...]int{1, 2, 3} // [3]int{1, 2, 3}