Add item to dictionary


I have a Dictionary and want to add a new key-value pair.


// Initialize the Dictionary
var dict = ["name": "John", "surname": "Doe"]
// Add a new key with a value

dict["email"] = ""


Heard the news?

The Swift Cookbook for Swift 3 is at last here! For iBooks, Kindle and Paperback.
Hurry up - and Check it out! ;-)