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
- Arrays, Dictionaries & Sets
- Sets — membership & operations
- Iteration patterns & mutability