ruby-uebungen/Assignment_028/solution/readme.md

543 B

Lösung: Map und Reduce

















































































```ruby def char_count(array) counts = array.map { |e| e.length } counts.reduce(:+) end

array = %w{ Free Kevin Mitnick } puts char_count(array)