gokursu/maps/demo1.go

14 lines
289 B
Go
Raw Normal View History

2024-01-16 02:25:45 +03:00
package maps
import "fmt"
func Demo1() {
my_dictionary := make(map[string]string)
// key - value
my_dictionary["table"]="Masa"
my_dictionary["book"]="kitap"
my_dictionary["pencil"]="Kalem"
fmt.Println(my_dictionary["book"])
2024-01-16 02:28:55 +03:00
fmt.Println("String number : ", len(my_dictionary))
2024-01-16 02:25:45 +03:00
}