cities example slice

This commit is contained in:
Mert Gör 🇹🇷 2024-01-11 11:36:53 +03:00
parent 3096ef663c
commit abb8a7ffac
Signed by: hwpplayer1
GPG key ID: 03E547D043AB6C8F
2 changed files with 9 additions and 1 deletions

View file

@ -15,5 +15,5 @@ func main() {
conditionals.Demo3() conditionals.Demo3()
loops.Demo5() loops.Demo5()
arrays.Demo4() arrays.Demo4()
slices.Demo1() slices.Demo2()
} }

8
slices/demo2.go Normal file
View file

@ -0,0 +1,8 @@
package slices
import "fmt"
func Demo2() {
cities := []string{"Ankara", "İstanbul", "İzmir"} // same as make
fmt.Println(cities)
}