Question from the Ruby test

What is the output of the following Ruby code? `numbers = [1, 2, 3, 4, 5]` `numbers.each { |n| puts n }` `numbers.map { |n| puts n }`

Easy

What is the difference between "each" and "map" ?

Author: HivebriteStatus: PublishedQuestion passed 275 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!