DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
9+7 =
Submit