I was reading the article “how to loop over arrays” over at Paul Hudsons Hacking with Swift blog, assuming I knew everything about looping over arrays. Guess what, I learned some new ways to iterate over an array!
So here’s a collection of cars:
let cars = [
"Tesla": "Model X",
"Lamborghini": "Aventador",
"Smart": "fortwo"
]
"Tesla": "Model X",
"Lamborghini": "Aventador",
"Smart": "fortwo"
]