Over a million developers have joined DZone.

Sum An Array In Ruby 1.9

·
Source: How to sum array members in Ruby? [stackoverflow.com]


array = [1,2,3]
array.inject(:+)

Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}