You are viewing a single comment's thread. Return to all comments →
Yea, in Swift I just had to use reduce property of an array and just returned it as a one liner.
return theArray.reduce(0,+)
Seems like cookies are disabled on this browser, please enable them to open this website
A Very Big Sum
You are viewing a single comment's thread. Return to all comments →
Yea, in Swift I just had to use reduce property of an array and just returned it as a one liner.
return theArray.reduce(0,+)