← Back to archive

Stdle #151 · blocks · 2026-11-04

What does this Ruby snippet output?

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

def triple(x)
x * 3
end
puts [1, 2, 3].map(&method(:triple)).inspect
Blocks
4 attempts left

Answer & explanation