← Back to archive

Stdle #129 · maps · 2026-10-13

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

Answer & explanation