$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · hard · #255

What is the output?

for i := range "hé!" {
	fmt.Print(i)
}
  1. 012
  2. 013
  3. 0123
  4. 123
Ranging over a string yields the byte offset of each rune. é takes two bytes in UTF-8, so the offsets are 0, 1 and 3.
Play Problem Solving ▸