Back to Developer Roadmap

for-range

src/data/roadmaps/golang/content/[email protected]

4.0531 B
Original Source

for-range

Special form of for loop for iterating over arrays, slices, maps, strings, and channels. Returns index/key and value. For strings, returns rune index and rune value. For channels, returns only values. Use blank identifier _ to ignore unwanted return values.

Visit the following resources to learn more: