← Back to archive

Stdle #15 · iteration · 2026-06-21

What does puts [1, 2, 3, 4, 5].filter_map { |x| x * 2 if… output?

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

puts [1, 2, 3, 4, 5].filter_map { |x| x * 2 if x.odd? }.inspect
Iteration
4 attempts left

Answer & explanation