Challenge 3: for vs .each — Solution # for loop version for n in 1..5 puts n end # .each version -- the idiomatic Ruby choice (1..5).each do |n| puts n end =begin Output (both loops print the same thing): 1 2 3 4 5 1 2 3 4 5 Notes: - Both versions produce identical output, but .each is the idiomatic Ruby choice. The for loop's variable (n) leaks into the surrounding scope and is still accessible after the loop ends; .each's block variable (n) stays cleanly scoped to the block and disappears once the block finishes. - (1..5) is a Range object, and .each is a method being called on it with a block — this is the same do...end block syntax used for arrays and hashes, which is part of why idiomatic Ruby favors it: one consistent iteration style across every collection type. =end