How to save value of an element selected by the array style in jQuery?
<p>Let's say we have following this:</p>

<pre><code>&lt;p class="first"&gt;This is paragraph 1.&lt;/p&gt; 
&lt;p class="second"&gt;This is paragraph 2.&lt;/p&gt; 
&lt;p id="third"&gt;This is paragraph 3.&lt;/p&gt;
&lt;p&gt;This is paragraph 4.&lt;/p&gt;
</code></pre>

<p>We can save the value of an element in <code>value</code> variable and show like this.</p>

<pre><code>var value = $('p').slice(3,4);
value.text(); // result --&gt; This is paragraph 4
</code></pre>

<p>Above way has no problem if we know the number of element but we'll get problem if we have a lot of elements and we want to do with looping. why I get error if I do like this? </p>

<pre><code>$('p')[3].text();
</code></pre>

<p>What should I do if I want to loop and get values?</p>
