Run ❯
×
Change Orientation
Change Theme, Dark/Light
package main import ("fmt") func main() { arr1 := [5]int{} //not initialized arr2 := [5]int{1,2} //partially initialized arr3 := [5]int{1,2,3,4,5} //fully initialized fmt.Println(arr1) fmt.Println(arr2) fmt.Println(arr3) }
[0 0 0 0 0] [1 2 0 0 0] [1 2 3 4 5]