← Back to archive

Stdle #101 · maps · 2026-09-15

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

Answer & explanation