← Back to archive

Stdle #125 · maps · 2026-10-09

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": 0}
v := m["a"]
_, ok := m["a"]
fmt.Println(v == 0, ok)
}
Maps
4 attempts left

Answer & explanation