Complete the code to declare an array of 5 integers in Go.
var numbers [[1]]intThe code declares an array named numbers with space for 5 integers.
Complete the code to assign the value 10 to the first element of the array.
numbers[[1]] = 10
Array indexes start at 0 in Go, so the first element is at index 0.
Fix the error in the code to print the length of the array.
fmt.Println(len([1]))
The len function takes the array variable directly without parentheses.
Fill both blanks to create a loop that prints all elements of the array.
for [1] := 0; [1] < [2]; [1]++ { fmt.Println(numbers[[1]]) }
The loop variable i starts at 0 and runs while less than the length of the array.
Fill all three blanks to create an array, assign values, and print the last element.
var [1] [3]int [1][0] = 5 [1][1] = 10 [1][2] = 15 fmt.Println([1][[2]])
The array is named nums. The last element index is 2 (since indexes start at 0). We print nums[2].
