- continue
continue
examples/continue/continue.go
package main import ( "fmt" ) func main() { i := 0 for { fmt.Println("") i++ fmt.Printf("A: %v\n", i) if i > 4 { break } fmt.Printf("B: %v\n", i) if i == 3 { continue } fmt.Printf("C: %v\n", i) } fmt.Println("after loop") }
A: 1 B: 1 C: 1 A: 2 B: 2 C: 2 A: 3 B: 3 A: 4 B: 4 C: 4 A: 5 after loop