for index in 0..<(toDoList.count / 2) {
let indexToSwap = (toDoList.count - 1) - index
let itemToSwap = toDoList[indexToSwap]
toDoList[indexToSwap] = toDoList[index]
toDoList[index] = itemToSwap
}
2 Likes