Coding at Home: April 23rd, Arrays

We’ll be live today at 1pm, Irish time.

while !understandsWhileLoops

We’ve covered while loops the last few days, which are ways to repeat a certain block of code while a condition is true. We learned why this tool is handy, and when you might use it instead of a for loop.

understandsWhileLoops = true

Now we’re ready for the next tool.

Today: Arrays!

In Chapter 10, we talk about arrays.

From Learn to Code 2: Arrays

An array is a list of items. In Swift, the items in the list will all have the same type. In our playgrounds, we might have an array of Characters or Ints (remember, these are whole numbers).

This is a heavily used tool in programming.

If you skipped ahead a little bit in the Rock, Paper, Scissors playground, you may have seen arrays in use and wondered what the square brackets (‘[‘ and ‘]’) were for, or some of the ways loops were used looked a little different than our for i in 1...n or while condition syntax.

We’ll learn all about the syntax of arrays; how to create them, change them, and use them.

See you at 1pm, Irish time!

Leave a Reply

Your email address will not be published. Required fields are marked *