Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift reduce function

var newArr: [Int] = []
for value in arrayOfInt { newArr.append(value*10) }
print(newArr) // prints [20, 30, 40, 50, 40, 70, 20]
Source by abhimuralidharan.medium.com #
 
PREVIOUS NEXT
Tagged: #swift #reduce #function
ADD COMMENT
Topic
Name
3+7 =