Skip to content

Commit 4db927c

Browse files
committed
adding code for slices
1 parent 7abb33a commit 4db927c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

slices/main.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 (
4+
"fmt"
5+
)
6+
7+
var (
8+
name = []string{"Bill", "Ted", "Frank"}
9+
)
10+
11+
const (
12+
pi = 3.14
13+
)
14+
15+
func main() {
16+
fmt.Printf("Hello, %s %v !\n", name[1:2], pi)
17+
}

0 commit comments

Comments
 (0)