title: Add value to empty Swift array
body: <p>I cannot figure out how to add values to an empty array in Swift. I have tried started with empty array in two different ways:</p>
  
  <pre><code>var emptyArray : Int[]?
  emptyArray = Int[]()
  </code></pre>
  
  <p>and</p>
  
  <p><code>var emptyArray = []</code> </p>
  
  <p>(by the way, what is the difference with these two ways of creating empty arrays?)</p>
  
  <p>I have tried to add an integer to the array with <code>emptyArray.append(1)</code>, <code>emptyArray += [1]</code> but none works nor it is in the guide book (or maybe, it is hidden some where that I couldn't figure out). Both of these work if there is one or more values in it and this is driving me crazy! Please let me know how to if you know how to do it. Thank you!</p>