arr := []int{1, 2, 3, 4, 5}
for i := 0; i < len(arr); i++ {
fmt.Println(arr[i])
}
arr := []int{1, 2, 3, 4, 5}
for _, value := range arr {
fmt.Println(value)
}
arr := []int{1, 2, 3, 4, 5}
for index, value := range arr {
fmt.Println(index, value)
}
m := map[string]int{"a": 1, "b": 2, "c": 3}
for key, value := range m {
fmt.Println(key, value)
}