Write a While loop

 Problem

I want to write a While loop.



 Recipe


// Creating our loop

var x = 0

// Count from 0 to 9

while x<10 {
    print(x)
    x++
}
				

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