- map
Empty Map with make
examples/map-with-make/map_with_make.go
package main import "fmt" func main() { grades := make(map[string]int) fmt.Printf("%T\n", grades) grades["Mary"] = 99 grades["Jane"] = 88 grades["Bob"] = 93 fmt.Println(grades) }
map[string]int map[Bob:93 Jane:88 Mary:99]