Why use jQuery(selector).get(0) instead of jQuery(selector)[0] to get DOM element?
<p>Using jQuery is there any benefit to using <code>$(selector).get(0)</code> over <code>$(selector)[0]</code> if I just want to get the first item in the jQuery array as a DOM element?</p>

<p>HTML:</p>

<pre><code>&lt;form id="myForm"&gt;&lt;/form&gt;
</code></pre>

<p>Javascript:
</p>

<pre><code>var selector = '#myForm';
var domElement = $(selector).get(0); //Returns [object HTMLFormElement]

//Or
var domElement = $(selector)[0]; //Also returns [object HTMLFormElement]
</code></pre>

<ul>
<li><code>.get()</code> is more characters to type.</li>
<li>Both methods return the same result if the <code>$(selector)</code> is empty (<code>undefined</code>)</li>
<li><a href="http://api.jquery.com/get/" rel="nofollow">The jQuery documentation on <code>.get()</code></a> notes that you can simply use the index accessor to get the nth element, but you don't get the other benefits of <code>.get()</code> such as using a negative number to return items from the end of the array.</li>
<li>Also, you can call <code>.get()</code> with no arguments to return all the DOM elements of the jQuery array.</li>
</ul>
