Complete the code to create a slice of integers from 1 to 5.
numbers := []int[1]In Go, slices are created using curly braces {} inside the slice literal.
Complete the code to get a slice of the first three elements from the slice 'numbers'.
firstThree := numbers[1]To get the first three elements, slice from index 0 up to (but not including) index 3.
Fix the error in the code to get the last two elements of the slice 'numbers'.
lastTwo := numbers[1]len(numbers): which is invalid syntax.To get the last two elements, slice from len(numbers)-2 to the end.
Fill both blanks to create a slice of elements from index 2 up to 4 (exclusive) from 'numbers'.
middle := numbers[1][2]
Slices use square brackets with a colon to specify the range: [start:end].
Fill both blanks to create a slice of the last three elements from 'numbers' using slicing syntax.
lastThree := numbers[1][2]
The slice syntax is [start:end]. To get last three elements, start at len(numbers)-3 and go to the end.