JQuery. How to load inputs values to an array?
<p>I have multiple input fields.</p>

<pre><code>&lt;input type='text' size='10' name='firstname' id='firstname' /&gt;
&lt;input type='text' size='20' name='lastname' id='lastname' /&gt;
&lt;input type='password' size='5' name='password' id='password' /&gt;
</code></pre>

<p>I want to get all their values into a single array with jQuery. Like this one.</p>

<pre><code>1 =&gt; 'Barack',
2 =&gt; 'Obama',
3 =&gt; '123456'
</code></pre>

<p>Existing method val() returns value from first match.</p>

<pre><code>$('#firstname,#lastname,#password').val(); //returns only first name
</code></pre>
