What is the easiest (best) way to find the sum of an array of integers in swift? I have an array called multiples and I would like to know the sum of the multiples.
How about the simple way of
for (var i = 0; i < n; i++) { sum = sum + Int(multiples[i])! }
//where n = number of elements in the array