One of the preferred way to loop through arrays and slices is to use range like this
arr = []int{1, 2}
for index, item := range arr {
continue
}
I know how range works, I've been using it multiple times. But I'm still not sure what it is behind the scene. Is it a function and a modification of range(arr)? The fact that it returns 2 variables make me think that way, but I need a confirmation.
What's the implementation behind it?