Quick actions

cmd+k|ctrl+k

Navigation

Languages

for, while loops / break and continue / Essential Go

Snippet info

Language

Go

Visibility

public

Author

kkowalczyk

Created

2019-03-26T10:14:17Z

Updated

2019-03-26T10:14:17Z

package main

import "fmt"

func main() {
	j := 100

loop:
	for j < 110 {
		j++

		switch j % 3 {
		case 0:
			continue loop
		case 1:
			break loop
		}

		fmt.Println("Var : ", j)
	}
}
INFO