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 trialdonnie scantz
419 Pointsnot sure what to do here
inside of loop? and what code?
// Enter your code below
var results: [Int] = []
for multiplier in 1...10 {
print ("\(multiplier) times 6 is equal to \(multiplier * 6)")
}
1 Answer
Jennifer Nordell
Treehouse TeacherHeya donnie scantz! I posted an explanation and solution to this challenge not terribly long ago. Take a look here and see if it clears things up for you
https://teamtreehouse.com/community/challenge-task-2-of-2-swift-20-collections-and-control-flow
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse Teacherdonnie scantz I saw your comment in my other post about where Pasan talks about the append method. This happened a few videos back. Here's a link to the video:
https://teamtreehouse.com/library/swift-20-collections-and-control-flow/introduction-to-collections/adding-items-to-arrays
He briefly mentions the append being a method. This starts at about 13 seconds into the video.
Here is some documentation from Apple regarding specific methods that can be used on an array. Keep in mind that an array is an object (and this might be a little out of the scope of where you're working right now, but they'll get to it). A method is a function that's specified in the definition of a class and can be used on an object.
https://developer.apple.com/library/ios/documentation/Swift/Reference/Swift_Array_Structure/index.html#//apple_ref/swift/struct/s:Sa