1// Dictionaries are placed in braces, and values are seperated with a comma
2let myDictionary = {
3 "value 1": "string",
4 "value 2": 2,
5 "value 3": ["array value 1", "array value 2"]
6};
7
8// Access the dictionary using its keys
9var value1 = myDictionary["value1"]; // Type: String
10var value2 = myDictionary["value2"]; // Type: Int
11var value3 = myDictionary["value3"]; // Type: Array
1var test_dictionary = {
2 "This is a key" : "This is the value of this key",
3 "You can make many keys" : {
4 // You can even nest dictionaries in one another
5 "Integer" : 123,
6 "String" : "Hello, world!",
7 "Boolean" : true,
8 "Array" : [1,2,3,4,5]
9 }
10}