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

Morgan Norelius
Morgan Norelius
572 Points

totally lost. Why is the range causing error message?

as stated in the title, I don't understand this code challenge at all

loops.swift
// Enter your code below
var results: [Int] = []
for multiplier in results 1...10 {
results.append(multiplier)          
}
Jhoan Arango
Jhoan Arango
Treehouse Moderator 12,877 Points

Hello,

Please see the other answer from your other question.

1 Answer

Steven Parker
Steven Parker
186,662 Points

You're close, but the word "results" should not appear in the "for" line.

And it's not the multiplier itself the challenge asked you to store, it's multiples of 6 (multiplier * 6).