Skip to content

Glossary: Go Basics

Slicing

Also written: slice expression, s[low:high]

`s[low:high]` gives the part of a slice from index `low` up to, but not including, `high`. The result shares the same array, so changes show through both.

Where the book teaches it