Skip to content

Instantly share code, notes, and snippets.

@kjk
Created November 5, 2019 21:16
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/9870092f584e2a8b22975b537b4b8884 to your computer and use it in GitHub Desktop.
Save kjk/9870092f584e2a8b22975b537b4b8884 to your computer and use it in GitHub Desktop.
for, while loops
// :collection Essential Go
package main
import "fmt"
func main() {
// :show start
for i := 0; 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