7 Days Swift Challenge – Day 2: Array in Swift – How to Make an App

[ad_1]
GET THIS SWIFT COURSE FOR FREE:

Variable is a way for us, developers to store a piece of information so we can store, manage and manipulate the data. Maybe you want to do some calculations, some data mining out of it, send the piece of data over the Internet even.

Most of the time, out data comes in form of a series of ordered things. For example, we have todos, shopping list, Amazon wishlist, a series of posts on your social media newsfeed.

How can we make sure that we can keep track of these data?

We use Array. Let’s talk about it in today training.

Your Code Challenge:

In today code challenge, we will create a todo list app.

+ Create a variable called todos and initialize it with an array of several todo items you need to do today.

+ Make each todo item a String.

+ Next, get me the first todo that you have in the array.

+ What is the first index of the array? What is the last index?

+ Now, in the middle of the day you realized that you want to squeeze in a 7DSC session at night. Add the item “Study 7DSC for 30 minutes” in the end of the array.

+ Inspect the array and can you let me know how many todo items are there in your array?

+ Now we know how many items you have, can you get access to the last item without counting the index by hand?

+ Finally, share you Code Challenge solution in the comment section with me below!

Have fun and good luck,

– Duc

Love even more advanced and in-depth training with me? Join Total iOS Blueprint 2 where I share with you how to build 11 iOS apps from scratch with awesome video tutorials just like these.

GET THIS SWIFT COURSE FOR FREE:

********************************
*** ABOUT CODE MASTERY ***
********************************
Code Mastery is hosted by Duc Tran, founder of Developers Academy.

This is his free-style no notes, no teleprompter presentation and live coding broadcast with you guys everyday.

To join Duc’s free courses, register for free at

*************************
*** MEET DUC TRAN ***
*************************

Duc Tran is founder of Developers Academy, one of the world’s leading iOS, Android and Web development trainers.

More than 2,000,000 developers have studied his video trainings; 100,000 developers see his posts each month. Each year, Duc has helped 20,000 plus developers gratudate from his online courses or video series.

*************************************************
*** FREE TRAININGS IN IOS DEVELOPMENT ***
*************************************************
To subscribe and get free tutorials, courses and weekly content, visit me at:
Connect with Duc on facebook:
Tweet him:
Get daily inspiration:


Posted

in

by

Tags: