var tempsArray = [65,62,63,64,67,68,69,68,67,65,63,65,65]
func createCoordinates(temps: [Int]) -> Dictionary<Int, Int> {
var tempCoordinates = [Int: Int]()
for temperature in temps {
tempCoordinates[temperature] = temps[temperature]
}
return tempCoordinates
}
createCoordinates(tempsArray)
The goal is a function that takes an array of Ints as its only parameter and returns a dictionary of coordinates. In this case the goal is (0:65,1:62,2:63,...)
My code is not executing and is giving me an error of "Array index out of range"