title: jQuery TypeError: array index is undefined
body: <p>I have some <code>divs</code> and need to store data of each <code>div</code> in a array. So i used a two dimensional array to store these data in following way.</p>
  
  <pre><code>this.saveBoardAndNotes = function (board_id, board_name) {
          var noteList = new Array(new Array());
          var self = this;
          var count = 0;
  
          $(".optimal-sticky-notes-sticker-note").each(function(){
              // Replace plain urls with links and improve html
              var note = $(this);
              var content = note.find(".textarea").html();
              var properties = JSON.stringify(self.getProperties(note));
              var noteID = note.attr("id");
  
              noteList[count]['content'] = content;
              noteList[count]['properties'] = properties;
              noteList[count]['noteID'] = noteID;
  
              count++;
          });
  </code></pre>
  
  <p>But i get following error in firebug when i try to store more than one div in array</p>
  
  <p><code>TypeError: noteList[count] is undefined</code></p>
  
  <p>How can i solve the problem. By the way, is there any optimized way? Thanks in advance.</p>