← Back to archive

Stdle #147 · hashes · 2026-10-31

What does this Ruby snippet output?

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

h = {a: 1, b: 2, c: 3, d: 4}
puts h.filter_map { |k, v| "#{k}!" if v.even? }.inspect
Hashes
4 attempts left

Answer & explanation