← Back to archive

Stdle #17 · iteration · 2026-06-23

What does this Ruby snippet output?

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

h = {a: 1}
puts h.fetch(:a)
puts h.fetch(:b, 99)
Iteration
2 lines
4 attempts left

Answer & explanation