golang for range int code example Example: for range go arr = [1,2,3,4] for i, val := range arr { print(i, val) // prints iterator, value }