Answers for "swift reduce function"

0

swift reduce function

var newArr: [Int] = []
for value in arrayOfInt { newArr.append(value*10) }
print(newArr) // prints [20, 30, 40, 50, 40, 70, 20]
Posted by: Guest on January-25-2022

Code answers related to "Swift"

Browse Popular Code Answers by Language