Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Empty Map

  • map
package main

import "fmt"

func main() {
	grades := map[string]int{}
	fmt.Printf("%T\n", grades)

	grades["Mary"] = 99
	grades["Jane"] = 88
	grades["Bob"] = 93

	fmt.Println(grades)

	grade := grades["Jane"]
	fmt.Println(grade)
}