← Back to archive

Stdle #18 · interfaces · 2026-06-24

What does this Go snippet output?

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

package main
import "fmt"
func main() {
var nums = []interface{}{1, "two", 3.0}
for _, n := range nums {
fmt.Printf("%T ", n)
}
fmt.Println()
}
Interfaces
4 attempts left

Answer & explanation