Skip to content

Latest commit

 

History

History
4 lines (4 loc) · 195 Bytes

rb_methods_reduce.md

File metadata and controls

4 lines (4 loc) · 195 Bytes
completeArray = [array1, array2, array3].reduce([], :concat)

reduce iterates over the array it's called on. [] is the starting value and concat is the method being called on every object.