Write a For loop

 Problem

I want to create a For loop.



 Recipe


// Creating our loop - C-style

for var x=0; x<10; x++ {
    print(x)
}

// Our loop - pure Swift-style

for var y in 0..<10 {
	print(y)
}
				

Heard the news?

The Swift Cookbook for Swift 3 is at last here! For iBooks, Kindle and Paperback.
Hurry up - and Check it out! ;-)

 

 Playground