Beginner Tutorial for Swift
Swift Arrays are a collection where each item uses a numerical index. Code below returns the value “signs”
var categories = ["signs","roads","behaviour"]
categories[0]
With Dictionary instead of using numerical indexes, you can specify a unique key. Code below returns the value “signs”
var categories = ["basics" : "signs", "intermediate": "roads", "advanced":"behaviour"]
categories["basics"]