Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 302 Bytes

sum_mixed_array.md

File metadata and controls

14 lines (10 loc) · 302 Bytes

Description

Given an array of integers as strings and numbers, return the sum of the array values as if all were numbers.

Return your answer as a number.

My Solution

def sum_mix(x)
  x.map(&:to_i).sum
end