title: Populate a multidimensional array with a loop
body: <p>I'm trying to populate a multidimensional array with this code:</p>
  
  <pre><code> var array = [[Int]]()
          for i in 0...3 {
              for j in 0...3{
                  array[i][j] = i + j    &lt;&lt;- Error
              }
  
          }
  </code></pre>
  
  <p>But I get an error:</p>
  
  <pre><code>fatal error: Index out of range
  </code></pre>
  
  <p>What am I doing wrong?</p>