GoMapmake(map)

Creates and initializes a new map.

Syntax

make(map[K]V) map[K]V

Example

Enter values below to update the example in real time.

make
map
string
fmt
Println
apple
banana
m := make(map[string]int)
m["apple"] = 5
m["banana"] = 3
fmt.Println(m) // map[apple:5 banana:3]