Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

break out from internal loop (labels)

package main

import (
	"fmt"
)

func main() {
OUT:
	for i := 1; i < 5; i++ {
		for j := i; j < 5; j++ {
			k := i * j
			if k > 10 {
				break OUT
			}
			fmt.Println(k)
		}
	}
}
1
2
3
4
4
6
8
9