Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
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
 D. Sommer D. Sommer
Author Profile Icon D. Sommer
D. Sommer
 Campagno Campagno
Author Profile Icon Campagno
Campagno
Arrow right icon
View More author details
Toc

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 had toy bins of their own. We were tasked to go through all these toy bins and throw away a particular flower that had a name we'd never heard of before. The name of this flower is Buttercup:

Being the Swift developer that we are, we've decided to write a program to handle this for us. For us (as humans) to go through each item one at a time from every single toy bin, it might take us forever to finish! 

Getting right to it, we decided to create a function to handle this problem for us. This function will need to have one argument. When we look to call on this function, we will be giving it something; the something being an array of strings. That array of strings represents all the different items belonging to one person (their toy bin). In our implementation of this function, we will first create a new empty array (or new empty toy bin), and...

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 £13.99/month. Cancel anytime
Visually different images