title: What is the best way to append an array using for in loop in Swift?
body: <p>I am currently attempting to learn how to code swift via treehouse.com and so far I am enjoying it. I just came to my first "code challenge" as they call it that I somewhat struggled on. As the title suggested, the started with an empty array as such:</p>
  
  <pre><code>var results: [Int] = []
  </code></pre>
  
  <p>That is fine and dandy. The goal is to then write a for in loop which finds the multiples of 6 for the numbers 1-10 and then to append those values to the array. I eventually did figure it out, but I am not sure that I did it in the ideal way. I'd appreciate any criticism. My code will be included below. Do bear in mind that I am a total beginner to Swift and to coding in general. Thanks in advance for any suggestions/tips.</p>
  
  <pre><code>var results: [Int] = []
  for multiplier in 1...10 {
      let multiples = (multiplier * 6)
      print(multiples)
      results.append(multiples)
  }
  </code></pre>
  
  <p>The code executes properly and the array is appended with the values, but again, I am unsure if there is a better way to do this.</p>