You must log in or # to comment.
This is a thinly veiled advertisement.
tl;dr: The length of a slice is not a valid index into that slice.
Of course. Because Go uses zero-based indexing, just like many other languages.
tl;dr
arr[len(arr)]is wrong;arr[len(arr)-1]is right because Go uses zero-based indexes like a bunch of other languages.



