Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 207 Bytes

(8 kyu) Sum of positive.md

File metadata and controls

7 lines (4 loc) · 207 Bytes

Sum of positive (8 kyu)

You get an array of numbers, return the sum of all of the positives ones.

Example [1,-4,7,12] => 1 + 7 + 12 = 20

Note: if there is nothing to sum, the sum is default to 0.