Complete the code to create a slice of integers named numbers.
numbers := [1]In Go, slices are created using []type{values}. Option A correctly creates a slice of integers.
Complete the code to create an empty slice of strings named words.
var words [1]To declare an empty slice of strings, use var words []string.
Fix the error in the code to create a slice of floats with length 5.
floats := make([1], 5)
make.The make function requires a slice type like []float64 to create a slice with length 5.
Fill both blanks to create a slice of integers with length 3 and capacity 5.
nums := make([1], [2], 5)
The make function creates a slice with type []int, length 3, and capacity 5.
Fill all three blanks to create a slice of strings named colors with initial values and print its length.
colors := [1]{"red", "green", "blue"} fmt.Println(len([2])) fmt.Println([3][1])
We create a slice of strings with []string{"red", "green", "blue"}. Then we print its length and the second element.