Stdle #175 · iteration · 2026-11-28
What does this Ruby snippet output?
A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
result = [1, 2, 3, 4].each_with_object({}) do |x, h| h[x] = x ** 2endputs result.inspectIteration
Stdle #175 · iteration · 2026-11-28
A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
result = [1, 2, 3, 4].each_with_object({}) do |x, h| h[x] = x ** 2endputs result.inspect