Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

Your stuff isn't right

Your compiler does not recognize the multipler variable declared in my code: var multiplier: Int = i

// Enter your code below
var results: [Int] = []
for i in 1..10 {
  var multiplier: Int = i * 6

2 Answers

Everything worked when I changed .. to ... (two dots to three dots)

Jason Anders
Jason Anders
Treehouse Moderator 145,858 Points

Hey Gregory,

No, the "stuff" is right, but there are a three errors in your code, and that is why you are receiving the Bummer!

  1. The challenge did not ask for this line: var multiplier: Int = i * 6, so it needs to be deleted.
  2. The challenge explicitly asks you to name the temporary constant in the for loop "multiplier", but you named it "i", so that needs to be changed.
  3. The for loop is supposed to be 1 to 10, including 10 (inclusive), so you need three periods between the value, not two. With only two, the values will only include 1 thru 9 (exclusive).

Just fix up those three things and your code will pass. Challenges are very specific, so if the instructions aren't followed exactly it will not pass.

Keep coding! :) :dizzy: