Created
November 5, 2019 21:17
-
-
Save kjk/4378f43b1d016fa3a85f9786c6476f84 to your computer and use it in GitHub Desktop.
for without initialization statement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// :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