Skip to content

Instantly share code, notes, and snippets.

@kjk
Created November 5, 2019 21:20
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/7e8af34a77b303fe7e1e046cdef6995b to your computer and use it in GitHub Desktop.
Save kjk/7e8af34a77b303fe7e1e046cdef6995b to your computer and use it in GitHub Desktop.
for without increment statement
// :collection Essential Go
package main
import "fmt"
func main() {
// :show start
for i := 0; i < 5; {
fmt.Printf("i: %d\n", i)
i += 2
}
// :show end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment