Slices
Slices are what you’ll actually use day-to-day. Unlike arrays, they’re dynamically sized — a flexible window into an underlying array.
The type []T is a slice of T values.
Create a slice with a low and high bound separated by a colon:
a[low : high]
This is a half-open range: it includes the element at low, but excludes high. So a[1:4] gives you elements at indices 1, 2, and 3.
Try it: Change the indices in primes[1:4] to see different subsets of the array.