I\'m learning Swift and found one wonderful tutorial where explained how to create card game. Point is that we use 14 cards with card images and image files are named ca
Here is the solution. You first need to initialize an empty string array before the for loop. You then iterate from 1 to 13, not 0 to 13 since it will include 0. You then append the string to the array. Your string formatting was incorrect so notice the way to format it in Swift.
var cardNamesArray = [String]()
for i in 1...13 {
cardNamesArray.append("card\(i)")
}