Check out example codes for "golang iterate through slice". It will help you in understanding the concepts better.

Code Example 1

var slice = []string{"Apple", "Orange", "Kiwi"}
for index, sliceItem := range slice { // You can omit index or sliceItem with a _
  fmt.Println("Index in slice:", index)
  fmt.Println("Fruit:", sliceItem)
}

Learn ReactJs, React Native from akashmittal.com