Create JS array from input field values
<p>I have x number of input fields with class='agency_field'. How can I create a JS array that contain the values of all fields with this class?</p>

<p>Using jQuery, this gives a syntax error:</p>

<blockquote>
  <p>$(".agency_field").each(function(index)
  {         agencies[] = $(this).val();     });</p>
</blockquote>
