Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Swift iOS Programming for Kids

You're reading from   Swift iOS Programming for Kids Help your kids build simple and engaging applications with Swift 3.0

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781787120747
Length 260 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Steffen D. Sommer Steffen D. Sommer
Author Profile Icon Steffen D. Sommer
Steffen D. Sommer
Jim Campagno Jim Campagno
Author Profile Icon Jim Campagno
Jim Campagno
Arrow right icon
View More author details
Toc

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 code when we use a function. We say that a function abstracts an amount of work we only have to define once. This idea of reusing code is central to programming and functions are just a tool to help programmers...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image