title: Create array of strings using for-in in Swift
body: <p>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 <em>card0, card1...</em> etc. </p>
  
  <p>So, we have to create array of strings with these filename. Teacher does it with hardcoding like </p>
  
  <pre><code>var cardNamesArray:[String] = ["card1","card2","card3","card4","card5","card6","card7","card8","card9","card10","card11","card12","card13"]
  </code></pre>
  
  <p>I want to do it with the for-in. But when I try to do like this:</p>
  
  <pre><code>for i in 0...13 {
  var cardNamesArray:String = [String(format: "card%i", i)]
  }
  </code></pre>
  
  <p>I get error in XCode on line with for.... "Expected declaration". </p>
  
  <p>Could you please point me where I'm wrong or if there is another way to do it.</p>