Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 386 Bytes

array_plus_array.md

File metadata and controls

14 lines (11 loc) · 386 Bytes

Description

I'm new to coding and now I want to get the sum of two arrays... Actually the sum of all their elements. I'll appreciate for your help.

P.S. Each array includes only integer numbers. Output is a number too.

My Solution

def array_plus_array(arr1, arr2)
  (arr1 + arr2).sum
end