← Back to archive

Stdle #51 · maps · 2026-07-27

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[string]int
defer func() {
if r := recover(); r != nil {
fmt.Println("recovered:", r)
}
}()
m["a"] = 1
fmt.Println(m)
}
Maps
4 attempts left

Answer & explanation