Get an array of list element contents in jQuery
<p>I have a structure like this:</p>

<pre><code>&lt;ul&gt;
  &lt;li&gt;text1&lt;/li&gt;
  &lt;li&gt;text2&lt;/li&gt;
  &lt;li&gt;text3&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>How do I use javascript or jQuery to get the text as an array?</p>

<pre><code>['text1', 'text2', 'text3']
</code></pre>

<p>My plan after this is to assemble it into a string, probably using <code>.join(', ')</code>, and get it in a format like this:</p>

<pre><code>'"text1", "text2", "text3"'
</code></pre>
