Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

What does inject in ruby do

[3, 6, 10].inject {|sum, number| sum + number} =>|3, 6| 3 + 6 => 9                                               =>|9, 10| 9 + 10 =>19
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #What #inject #ruby
ADD COMMENT
Topic
Name
9+7 =