© Radoslava Leseva Adams and Hristo Lesev 2016

Radoslava Leseva Adams and Hristo Lesev, Migrating to Swift from Flash and ActionScript, 10.1007/978-1-4842-1666-8_20

20. Control Flow

Radoslava Leseva Adams and Hristo Lesev2

(1)London, UK

(2)Kazanlak, Bulgaria

We have so far covered types and operators in Swift and you know how to declare variables and constants. Now is time to go over how you can control the execution of your code. It’s all about loops, conditional statements, keywords for changing the course of action, and Christmas carols . . .

Loops

It is Christmas as I am writing this and the shops and cafés around me are playing the obligatory Christmas carols in a loop. One in particular strikes me as an example I could steal to play with and ...

Get Migrating to Swift from Flash and ActionScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.