Book Image

Swift iOS Programming for Kids

By : Steffen D. Sommer, Jim Campagno
Book Image

Swift iOS Programming for Kids

By: Steffen D. Sommer, Jim Campagno

Overview of this book

This book starts at the beginning by introducing programming through easy to use examples with the Swift Playgrounds app. Kids are regularly encouraged to explore and play with new concepts to support knowledge acquisition and retention – these newly learned skills can then be used to express their own unique ideas. Children will be shown how to create their first iOS application and build their very own movie night application.
Table of Contents (21 chapters)
Swift iOS Programming for Kids
About the Authors
About the Reviewer
Customer Feedback
Getting Set Up

Find the buttercup

To test out our function, we're first creating an array called stuff. In a playground file, click on the square box in the right pane and it will display the contents of the array (below the variable). The 0, 1, 2, and 3 numbers represent the index associated with the value at that index. As you've learned, arrays are indexed.  So, at index 0 you should find the value Coloring Book:

From what you've learned in this chapter, you should go through this function line by line to discern what it is that's actually happening and at what time. Give it your best shot! Look back at all the examples given in this chapter to help you. Don't rush through it either; it's important that you feel comfortable with these concepts. It's all about building more complexity on top of the basics, and if your core knowledge of Swift is strong, then it will make your further studies that much easier.

As you can see, validStuff is an array that contains all the same items that stuff has, except...