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

Create map with data in it already

package main

import "fmt"

func main() {
	grades := map[string]int{
		"Mary": 99,
		"Jane": 88,
		"Bob":  93,
	}
	fmt.Printf("%T\n", grades) // map[string]int
	fmt.Println(grades)        // map[Bob:93 Jane:88 Mary:99]
}