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

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:

Find the buttercup

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...

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