JQuery: How to get "item1, item2" from this HTML page?
<p>I want to get "item 1, item 2" out of this simple HTML page:</p>

<pre><code>&lt;html&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;body&gt;
&lt;ul id="mylist"&gt;
  &lt;li&gt;item 1&lt;/li&gt;
  &lt;li&gt;item 2&lt;/li&gt;
&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Here is what I tried on Chromium's JavaScript console:</p>

<pre><code>&gt; var a = $("#mylist").children().map(function(index,element){ return $(element).text(); });
&gt; a
["item 1", "item 2"]
&gt; a.join(", ")
TypeError: Object [object Object] has no method 'join'
</code></pre>

<p>If <code>a</code> was an array object, the <code>join</code> would work:</p>

<pre><code>&gt; ["item 1", "item 2"].join(", ")
"item 1, item 2"
</code></pre>

<p>But it is not, so how to join?</p>
