A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-83.go
1packagemain
2
3import"fmt"
4
5funcmain(){
6varainterface{}=[2]int{1,2}
7varbinterface{}=[2]int{1,2}
8fmt.Println(a==b)
9}
Interfaces
Answer & explanation
Console output
true
Why
Arrays are comparable in Go when their element type is comparable, comparing element by element. Both interfaces hold a [2]int with identical contents, so the dynamic types match and the values are equal, giving true. (Slices, by contrast, are not comparable and would panic.)