When I say order - I mean the order that the compiler chooses to display the results, I know that the dictionary does not have an index, such as an array.
I have the following dictionary:
let groups :Dictionary<String,AnyObject> = [ "Data": ["Save", "Restore"], "Load Tabs": ["Reload Tabs when selecting tab"], "Privacy": ["Set Passcode"], "About Me": ["Twitter", "LinkedIn"]]
But the console shows that it is displayed as follows:
["Privacy": ("Set Password"), "Download Tabs": ("Reload Tabs When You Select Tabs"), "Data": (Save, Restore), "About Me": (Twitter, LinkedIn)]
As you can see, the order is different, but when I change the order of the dictionary code, the output remains the same.
So can someone clarify this for me, please, so that I better understand how this is achieved? I am not trying to manipulate the dictionary, but I am trying to understand how the output is determined.
If the keys do not have a given order, should they not appear randomly every time the dictionary gives a result?