title: Convert array(object?) to string in javascript
body: <p>I am trying to convert this array into a string but it gives me the error: </p>
  
  <p><code>Object [object Array] has no method 'split'</code></p>
  
  <p>I am converting to a string, so it shouldn't have that problem, I'm not sure why I am getting this error.</p>
  
  <p>My code is:</p>
  
  <pre><code>function preSubmit(){
      var optionTexts = [];
      $("section").each(function(){
          var h2 = $(this).find("h2").text();
          optionTexts.push(h2);
          $("ol li", this).each(function() { optionTexts.push($(this).text()); });
      });
      var optionTextString = optionTexts.toString();
      var splitText = optionTextString.split(",");
      console.log(splitText);
      return splitText;
  }
  </code></pre>
  
  <p>The returned value of <code>typeof splitText</code> gives me [object Array], but I expect <code>string</code>.</p>