Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyRubyblocks do end and bracesSingle-choice MCQ

Why does this print an Enumerator instead of [2, 4, 6]?

p [1, 2, 3].map do |n| n * 2 end # => #<Enumerator: [1, 2, 3]:map>