what does double square brackets mean in swift?
arrays, swift, syntax
Solution
It is specifying that your variable `loadedMessages` is an array of arrays that contains `Message` objects. A JSON representation of `loadedMessages` might look like:
loadedMessages: [
[ <Message>, <Message>, <Message> ],
[ <Message>, <Message>, <Message> ]
]
A quick Playground implementation of something similar can give you a pretty good introspection of the situation:
var foo = [[String]]()
foo.append(["bar"])
foo[0][0] // reveals "bar"
Problem
the below is the sample code in swift. ``` var loadedMessages = [[Message]]() ``` Message is a custom class. i'm not sure what [[Message]] () is doing.