Chapter 6.  Making Pizza

Until now, we have been looking at how to create certain types and how to use variables as a tool for representing values in our programs. These are all fundamental concepts to understand when learning how to program, and this chapter will build upon that. In this chapter, we will take a look at something called functions.

As you have learned from Chapter 4Favorite Things, a variable can represent a value in our program. This means that without knowing the actual value, we can use the variable throughout our program to represent that value. In a way, you could say that we are reusing the value throughout the program by just using our variable. A function shares similar advantages in the sense that we are also reusing ...

Get Swift iOS Programming for Kids 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.