TypeError: Cannot read property '0' of undefined
<p>When I call <code>renderFrame</code>, trying to access <code>newLine[i]</code> throws an error of </p>

<pre><code>Uncaught TypeError: Cannot read property '0' of undefined
</code></pre>

<p>Why is this? I've included the relevant code.</p>

<pre><code>rows : ["-","-","-","-","-","-","-","-","-","-",],

generateLine : function(){
    var result = new Array(10);
    for(var i = 0; i &lt; result.length; i++){
        result[i] = " ";
    }
},

renderFrame : function(){
    var newLine = this.generateLine();
    for(var i = 0; i &lt; this.rows.length; i++){
        console.log(newLine[i]);
    }
},
</code></pre>
