← Back to archive

Stdle #50 · iteration · 2026-07-26

What does this Go snippet output?

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

package main
import "fmt"
func main() {
found := false
matrix := [][]int{{1, 2}, {3, 4}}
search:
for _, row := range matrix {
for _, v := range row {
if v == 3 {
found = true
break search
}
}
}
fmt.Println(found)
}
Iteration
4 attempts left

Answer & explanation