Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRubyblocks procs lambdas bindingSingle-choice MCQ

What does the local-variable list `; x` declare in a block, and what is the output here?

x = 10 [1, 2].each { |n; x| x = n } p x