Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kjk
Created November 5, 2019 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjk/4378f43b1d016fa3a85f9786c6476f84 to your computer and use it in GitHub Desktop.
Save kjk/4378f43b1d016fa3a85f9786c6476f84 to your computer and use it in GitHub Desktop.
for without initialization statement
// :collection Essential Go
package main
import "fmt"
func main() {
// :show start
i := 0
for ; i < 5; i += 2 {
fmt.Printf("i: %d\n", i)
}
// :show end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment