Skip to content

Commit f61184a

Browse files
committed
Includes loop E.g.
1 parent 42af593 commit f61184a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ch2/loops.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package main
2+
3+
import "fmt"
4+
5+
func main() {
6+
7+
i := 1
8+
for i <= 10 {
9+
fmt.Println(i)
10+
i = i + 1
11+
}
12+
13+
for ; i >= 1; i-- {
14+
fmt.Println(i)
15+
}
16+
17+
}

0 commit comments

Comments
 (0)