Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubytap and thenSingle-choice MCQ

Which statement correctly contrasts `tap` and `then` (`yield_self`)?

[1, 2, 3].tap { |a| a.sum } # => A [1, 2, 3].then { |a| a.sum } # => B