A for loop executes a block of code repeatedly, and in Golang, there are several different ways to write one.
- The standard three-component loop
- For-range loop
1. Range over slice
2. Range over map
3. Range over channel
4. Range over string
- While loop
- Optional components loop
- Infinite loop
- Break from a loop
- Continue (skip to the next iteration) in a loop
#golang #mailing-list