RosettaCodeData/Task/Loops-Foreach/Go/loops-foreach.go

6 lines
108 B
Go

func printAll(values []int) {
for i, x := range values {
fmt.Printf("Item %d = %d\n", i, x)
}
}