← Back to archive

Stdle #48 · mutability · 2026-07-24

What does this Ruby snippet output?

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

a = [1, 2, 3]
b = a
b.push(4)
puts a.inspect
Mutability
4 attempts left

Answer & explanation