← Back to archive

Stdle #11 · strings · 2026-06-17

What does this Go snippet output?

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

package main
import "fmt"
func main() {
sum := 0
for _, b := range []byte("AB") {
sum += int(b)
}
fmt.Println(sum)
}
Strings
4 attempts left

Answer & explanation