title: Julia: Append to an array
body: <p>Someone please help me understand this.  I have the following code below.  I am trying to append <code>index[i]-1</code> to an empty array. However I am getting this error: "<code>BoundsError: attempt to access 0-element Array{Any,1} at index [1]</code>" :</p>
  
  <pre><code>sample_size_array = [9,5,6,9,2,6,9]
  n_minus_1 = []
  array_length = length(sample_size_array)
  for i in 1:array_length
      n_minus_1[i].append(sample_size_array[i] -1)
  end
  println(n_minus_1)
  </code></pre>
  
  <p>If Julia does not understand <code>array[0]</code> then why is i starting at 0 and not at 1?</p>