Chapter 8. Reuse your code: Clean it with function detergent
This chapter discusses one of the most interesting and important topics: functions!
This chapter covers
- What a function is
- How a function is created and used
- How to pass data to a function
- How to receive data from a function
You’ve reached the eighth milestone: reuse your code. Before you get started, here’s the main thing you need to know about functions: functions exist so that you can reuse and clean your code.
Read on, and I’ll explain why you might want to ...
Get Hello Swift! 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.