how to add array values in javascript using push
<p>I have declared an array in JavaScript just view it.</p>

<blockquote>
<pre><code>var a[];  
a.push(number); 
alert(a);
</code></pre>
</blockquote>

<p>I am trying to send an integer values using push but total numbers that I am sending are not fixed. I want to get sum of all numbers which are passing from this array.</p>

<p>If there is any other solution which can be usable in web.</p>

<pre><code>a.push(number)
</code></pre>

<p>How can I add all values passing from this loop?</p>