Array with nils (swift)

Non nil Arrays

array_nil_1

Array OF optionals

http://stackoverflow.com/questions/25589605/swift-shortcut-unwrapping-of-array-of-optionals

Notice ‘?’ is inside of the bracket, thus, depicting it as array of optionals

You can use nils in your array by using Optional types in your array. Just be reminded that you need to use flatMap to return an array of non-optionals and filter out any nils i.e arrayWithNoOptionals.

Array that is optional

Notice question mark is outside of array type. Thus, marking it as an array that is optional. ile array itself has data or nil.