Question from the General knowledge for developers test

Write a Swift function that takes an array of integers and returns the sum of all the even numbers in the array.