← Back to archive

Stdle #95 · iteration · 2026-09-09

What does this Ruby snippet output?

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

result = [10, 20, 30, 40, 50].each_cons(2).map { |a, b| b - a }
puts result.inspect
Iteration
4 attempts left

Answer & explanation