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

iota skipping 0

  • iota
package main

import (
	"fmt"
)

const (
	_ = iota
	one
	two
	three
)

const (
	six = iota + 6
	seven
	eight
)

func main() {
	fmt.Println(one)
	fmt.Println(two)
	fmt.Println(three)
	fmt.Println()
	fmt.Println(six)
	fmt.Println(seven)
	fmt.Println(eight)
}
1
2
3

6
7
8