Programming-Idioms

History of Idiom 2 > diff from v79 to v80

Edit summary for version 80 :
[Go] Formatted code with `gofmt`

Version 79

2019-09-26, 17:29:26

Version 80

2019-09-26, 18:00:52

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration
Imports
import "fmt"
Imports
import "fmt"
Code
for i:=0 ; i<10 ; i++ {
	fmt.Println("Hello")
}
Code
for i := 0; i < 10; i++ {
	fmt.Println("Hello")
}
Demo URL
https://play.golang.org/p/WAztzFAML99