What to do when there are different input arrays in JavaScript?
<p>I'm learning JavaScript right now, quite a task being new to both the syntax and DOM manipulation. </p>

<p>Right now I'm not really using jQuery(or any other library). I've used it before but not interested at the moment since I want to get the hang of it then move to a library. I'm looking for plain JavaScript examples that do not involve libraries. </p>

<pre><code>&lt;form name="carritoDeCompras" action=""&gt; 
 &lt;table width="100%" border="0"&gt;
  &lt;tr&gt;
    &lt;td width="17%"&gt;Nombre de Articulo &lt;/td&gt;
    &lt;td width="22%"&gt;Precio&lt;/td&gt;
    &lt;td width="51%"&gt; Cantidades&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Desktop&lt;/td&gt;
    &lt;td&gt;&lt;input name="price[]" type="text" disabled="disabled" value="1900.00" id="1 "/&gt;&lt;/td&gt;
    &lt;td&gt;&lt;input name="cantidad[]" type="text" value="4" id="1 cantidad" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Monitor&lt;/td&gt;
    &lt;td&gt;&lt;input name="price[]" type="text" disabled="disabled" value="322.00" id="2" /&gt;&lt;/td&gt;
    &lt;td&gt;&lt;input name="cantidad[]" type="text" value="2" id="2 cantidad" /&gt;&lt;/td&gt;

  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Disco Duro&lt;/td&gt;
    &lt;td&gt;&lt;input name="price[]" type="text" disabled="disabled" value="244.33" id="3"/&gt;&lt;/td&gt;
    &lt;td&gt;&lt;input name="cantidad[]" type="text" value="10" id="3 cantidad" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Mouse&lt;/td&gt;
    &lt;td&gt;&lt;input name="price[]" type="text" disabled="disabled" value="100.21" id="4"/&gt;&lt;/td&gt;
    &lt;td&gt;&lt;input name="cantidad[]" type="text" value="100" id="4 cantidad" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;
</code></pre>

<p>My goal is to separate both price and quantity (cantidad) and sum them with an "update price" button. It has left me in doubt on how to grab those "price[]" "cantidad[]" inputs and keep them separated, so I can create a loop and well do the math.</p>

<p>Sorry for the spanish/english mix, gets in the way,</p>
