← Back to archive

Stdle #41 · hashes · 2026-07-17

What does this Ruby snippet output?

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

words = ["cat", "car", "bar", "bat"]
puts words.group_by { |w| w[0] }.inspect
Hashes
4 attempts left

Answer & explanation