Chapter 8. Smarter Toy Bin
In any iOS application, there are certain conditions that need to be met before we do something. For example, if we're hungry, we should eat! If we're tired, we should go to sleep. Along with working with conditions like this, we will also take a closer look at working with collection types.
This chapter will introduce you to the following tools in Swift:
- For loops, which allow us to iterate over collections, sequences, and strings to be able to read all the values contained within them
- If-else statements to satisfy certain conditions, such as if I'm hungry, then I should eat!
Buttercup
After finally making it to the moon, without a day's rest, we were tasked with a job. All the other kids who were about to land on the moon ...
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.