james-l
2/14/2017 - 5:50 PM

loop map(hash,dict) with range in go

loop map(hash,dict) with range in go

func main() {
	h := map[string]int{
		"A": 1,
		"B": 2,
		"C": 3,
	}

	for k, v := range h {
		fmt.Println(k, "-", v)
	}
}