[Solved] Ruby – map vs each?
[ad_1] The doc suggests: each { |item| block } → ary click to toggle source each → Enumerator Calls the given block once for each element in self, passing that element as a parameter. And: map { |item| block } → new_ary click to toggle source map → Enumerator Invokes the given block once for … Read more