0Pricing
Swift Academy · Lesson

Arrays, Dictionaries & Sets

Create and use arrays, dictionaries, and sets. Iterate, update, and understand mutability.

Intro

Collections hold groups of values. Swift has Array, Dictionary, and Set.

Arrays

Array is an ordered list. Append with .append().

var numbers: [Int] = [1, 2, 3]
numbers.append(4)
print(numbers)  // [1,2,3,4]

All lessons in this course

  1. Arrays, Dictionaries & Sets
  2. Sets — membership & operations
  3. Iteration patterns & mutability
← Back to Swift Academy