← Back to archive

Stdle #38 · maps · 2026-07-14

What does this Go snippet output?

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

package main
import "fmt"
func main() {
counts := map[string]int{}
counts["go"]++
counts["go"]++
fmt.Println(counts["go"], counts["rust"])
}
Maps
4 attempts left

Answer & explanation