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 trialanis ahmed
194 Pointsdont uderstand
xsdw
for-in = 1 * 7
for-in = 2 * 7
for-in =
1 Answer
Dave Berning
17,365 Pointsvar numbers = 1...7
for number in numbers {
println("\(number) * 7)
}
For-in loops keep looping until the value is false.
Your output should be.. 1 * 7 etc
Martin Wildfeuer
Courses Plus Student 11,071 PointsTake care, this has to be
for number in numbers {
Dave Berning
17,365 PointsThanks Martin, I updated it
Dave Berning
17,365 PointsThanks Martin, I updated it
Martin Wildfeuer
Courses Plus Student 11,071 PointsSure thing :)
Martin Wildfeuer
Courses Plus Student 11,071 PointsMartin Wildfeuer
Courses Plus Student 11,071 PointsHave a look at the Control Flow section of the developer docs. For In loops are explained in detail there, basically the first example is the solution to this assignment. I also recommend watching the videos again!