← Back to archive

Stdle #78 · arrays · 2026-08-23

What does this Ruby snippet output?

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

case [1, 2, 3, 4, 5]
in [first, *rest]
puts first
puts rest.inspect
end
Arrays
2 lines
4 attempts left

Answer & explanation