
Learning Go through the Ardan Labs tour — arrays chapter.
I mutate the array inside the loop. Does my loop see the mutation?
Depends which for range form I pick. 👇
for i := range arr — pointer semantics: reads the original array → mutation VISIBLE.
for i, v := range arr — value semantics: copies the WHOLE array before iterating → v is a stale copy.
Picking value vs pointer range isn't style. It decides correctness.


English
















