Javascript can't convert undefined to object
<p>I have the following code</p>

<pre><code>for(i = 0; i &lt; num; i++) {
    var yPos = 10*i;
    var numCells = wid/30;

    for(j = 0; j &lt; numCells; j++) {
        blocks[i][j] = 1;
    }                       
}
</code></pre>

<p>With</p>

<pre><code>blocks = new Array();
</code></pre>

<p>However, when I execute the code I receive an error stating that:</p>

<pre><code>can't convert undefined to object
</code></pre>

<p>Any ideas? :/</p>
