← Back to archive

Stdle #165 · maps · 2026-11-18

What does this Go snippet output?

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

package main
import "fmt"
func main() {
m := map[string]int{"a": 5}
delete(m, "ghost")
fmt.Println(len(m), m["a"])
}
Maps
4 attempts left

Answer & explanation