title: Cannot read property 'push' of undefined Javascript
body: <p>Hi it seams like i can't push my array ?
  code:</p>
  
  <pre><code>  $scope.arrResult = [];
    dpd.timesheets.get( function (result) {
      console.log(result);
  
      for (i = 0, n = result.length; i &lt; n; i++) {
        var item = result[i];
        $scope.arrResult[item.week].push(item);
      }
      console.log($scope.arrResult);
  
    });
  </code></pre>
  
  <p>i get this console error</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'push' of undefined
  </code></pre>
  
  <p>if i set <code>$scope.arrResult[item.week].push(item); to   $scope.arrResult[item.week] = item;</code>
  it works with no error
  but i need / want to push, whats wrong ?</p>