In this Swift Tutorial we will tell you how to sum up the numbers in Array using reduce function in Swift

Before you start please Create or open a Swift Playground and name it “ Swift Tutorial – How to sum up the numbers in Array (Reduce function)”

Follow Along

Let’s create an array of Ints to work with

Let’s sum up the numbers in this array and store them inside array

Let’s print the value

Task done!

As a result you will see the following in your playground:

Sum Up Array - Tutorial

Try more Swift tutorials at 👉 Swift Tutorials Navigation

This lesson is a part of Swift Tutorials and Lessons created by the Team. Feel free to save and share this post to social if you find this lesson useful or helpful.