Array´s and Dictionaries

Hello, I start learning Swift for Xcode an came to my first interruption. Here I can not understand line 8. For my understanding it does not interface any of the given dictionary words of the declaration of the variable occupations in line 4. In line 2 I understand that array unit 1 (“catf

ish”) is replaced by “bottle of water”.

 

1  var shoppingList = [“catfish”, “water”, “tulips”, “blue paint”]

2  shoppingList[1] = “bottle of water”

3

4  var occupations = [

5  “Malcolm”: “Captain”,

6  “Kaylee”: “Mechanic”,

7  ]

8  occupations[“Jayne”] = “Public Relations“

 

Excerpt from: Apple Inc. „The Swift Programming Language (Swift 3.0.1).“ iBooks. https://itun.es/de/jEUH0.l

Powered by WPeMatico

About

You may also like...

Comments are closed.