← Back to archive

Stdle #167 · maps · 2026-11-20

What does this Go snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

package main
import "fmt"
func main() {
var m map[int]int
v := m[99]
v++
fmt.Println(v, len(m))
}
Maps
4 attempts left

Answer & explanation