I have 2 Array of type Int like this
let arrayFirst = [1,2,7,9]
let arraySecond = [4,5,17,20]
I want to add the elements of each array, like arrayFirst[0] + arraySecond[0], arrayFirst[1] + arraySecond[1] an so on and assign it to another array, so the result of the array would be like
[5, 7, 24, 29]
What would be the best practice to achieve this using swift3
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…