Complete the code to declare an array of 5 integers in Go.
var numbers [[1]]intThe code declares an array named numbers with 5 elements of type int.
Complete the code to access the third element of the array named data.
value := data[[1]]Array indices in Go start at 0, so the third element is at index 2.
Fix the error in the code to append an element to a slice named items.
items = append(items, [1])The append function adds the value newItem to the slice items.
Fill both blanks to create a slice from an array named arr that includes elements from index 1 up to but not including index 3.
slice := arr[[1]:[2]]
Slicing syntax arr[start:end] includes elements from start up to but not including end. So arr[1:3] includes elements at indices 1 and 2.
Fill all three blanks to create a map from strings to integers with keys from a slice named keys and values from a slice named vals.
result := make(map[string]int) for i := 0; i < len([1]); i++ { result[[2][i]] = [3][i] }
The loop runs over the length of keys. For each index i, it sets result[keys[i]] = vals[i] to build the map.
