Skip to content

Latest commit

 

History

History

sum-positive

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Sum of Positive Numbers

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.