Evaluating specific array value using jQuery or JavaScript
<p>I have 160 inputs in my page. I want to add every 8 inputs and output it elsewhere. Instead of manually using </p>

<pre><code>var total1 = inputVals[0] + inputVals[1] + inputVals[2] + inputVals[3] + inputVals[4] + inputVals[5] + inputVals[6] + inputVals[7] + inputVals[8];
</code></pre>

<p>I want a function with which you can just specify the starting and ending index like addarray(9, 17) and it will add all the values between and will return it. I prefer the function to be in javascript but jquery is OK.</p>
