When you create a slice, you're really just making a 'window' into an existing array. So, any changes you make to the slice can also change the underlying array and vice versa.
Share this post
Go EP 18: Slice Is Basically an Array Wrapper
Share this post
When you create a slice, you're really just making a 'window' into an existing array. So, any changes you make to the slice can also change the underlying array and vice versa.