iOS Swift Collections and Control Flow Control Flow With Loops For In Loops

Lee Weiss
Lee Weiss
1,062 Points

How do I assign the results of a loop to an array?

I created a loop to find the first 10 multiples of 6. I was then asked to assign to an array and I cannot figure this next step out.

loops.swift
// Enter your code below
var results: [Int] = []

for multiplier in 1...10 {
     (multiplier * 6)
}

1 Answer