Iterate an array w/ explicit object type in Swift
swift
Solution
When you type a variable, you do:
var score: Int
And you do the same in a loop:
for score: Int in individualScores {
}
It seems to be pretty consistent in that regard.
Problem
I have an array: ``` let individualScores = [75, 43, 103, 87, 12] ``` And I iterate like this: ``` for score in individualScores { } ``` However, is there a way to declare the object type explicitly? I think it would come in handy later w/ custom objects, or other reasons. Something like: ``` for Integer score in individualScores { } ```