Issues with .length returning as undefined
<p>I'm building a project that uses a function called Chat.fetch(); it's an asynchronous function that pulls an array of strings from the server. It's an ajax function that for purposes of the project is already defined, I just have to call it correctly. There is another function we are given called Chat.display() which takes a string and displays it in bulleted form on the console. Right now this is what I've got: I'm getting an error that says cannot read property length of undefined. So I guess.length is undefined for superArray? The goal is to create this function and use it as the call back function for Chat.fetch(). Do you guys have any idea why I'm getting this .length error? I'm pretty confused. Thanks!</p>

<pre><code>&lt;!DOCTYPE html&gt;
    &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;script src="http://chatbuilder.hackreactor.com/ChatBuilder.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;script&gt;


    Chat.guide.start();
    &lt;/script&gt;

    &lt;h2&gt;Borken Chat&lt;/h2&gt;

    &lt;input class="draft" type="text"/&gt; &lt;button class="send" disabled&gt;send&lt;/button&gt;



    &lt;ul class="messages"&gt;

  &lt;script&gt;
    var list;
    var superArray=[];
    darray=function(superArray){
      var y=superArray.length;
      for(i=0;i&lt;y;i++){
        Chat.display(x[i]);
      }
    }
    Chat.fetch(darray(list));
  &lt;/script&gt;

    &lt;/ul&gt;
</code></pre>

<p></p>
