Loops (for)
Go's only loop is for, with three forms: classic, conditional (like while), and range.
Simple enough for a 5-year-old to understand
Classic for
package mainimport "fmt"func main() { for i := 1; i <= 3; i++ { fmt.Println(i) }}🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)
🎯 Expected output: 1
2
3
4
5