Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Jeffrey Ratner
PLUS
Jeffrey Ratner
Courses Plus Student 1,023 Points

Not sure what question is asking you to do

I can't quite figure out what the problem is asking you to do. Can someone spell it out in more detail? Thanks.

loops.swift
// Enter your code below
var results: [Int] = []
for results in 1...10{
    let multiplier = 6
    print("\(results) * \(multiplier)")
     let multiple = (multiplier * 6)
    results.append(multiple)


    }

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

I actually think you have the right idea but your variable names are getting a little confused here and there. Also, you're printing when it doesn't want you to print. I posted a solution with a fairly detailed explanation to this challenge not long ago here:

https://teamtreehouse.com/community/challenge-task-2-of-2-swift-20-collections-and-control-flow

Take a look! Hope this helps! :smiley: