Back to Developer Roadmap

Iterating Maps

src/data/roadmaps/golang/content/iterating-maps@Q6ic-AGG_gnXEOdmqom89.md

4.0589 B
Original Source

Iterating Maps

Use for range to iterate over maps, returns key and value pairs. Iteration order is random for security reasons. Use blank identifier _ to ignore key or value. Cannot modify map during iteration unless creating new map. Safe to delete during iteration.

Visit the following resources to learn more: