Why type "testScores [" dave "]" is "Optional <Array <Int>>. Enter" instead of "<Array <Int>>. Enter"
I am new to Swift and am trying to learn the concept of index. When I tried to figure out the return value of testScores ["dave"], I expected Array<Int>.Type, however, instead of the IDE instead Optional<Array<Int>>.Type.
Why is this so? Did I miss something?
var testScores = ["dave": [82, 84, 86], "jen": [23, 14, 5], "ben": []]
testScores["dave"].dynamicType
+4