Technical requirements

The Xcode playground for this chapter is in the Chapter06 folder of the code bundle for this book, which can be downloaded here:

If you wish to start from scratch, create a new playground and name it FunctionsAndClosures.

You can type in and run all of the code in this chapter as you go along. Let's start with functions.

Check out the following video to see the code in action:

Get iOS 13 Programming for Beginners - Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.