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 Basics (retired) Control Flow For-In Loop

dont uderstand

xsdw

for_loops.swift
for-in = 1 * 7
for-in = 2 * 7
for-in =
Martin Wildfeuer
Martin Wildfeuer
Courses Plus Student 11,071 Points

Have 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!

1 Answer

Dave Berning
Dave Berning
17,365 Points
var 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