title: How to multiply all items in array inside a loop with JavaScript
body: <p>I have dynamic input of items 0 to N in a function (JavaScript).</p>
  
  <p>In each position have value like <code>items[1,3,4]</code>, creating a loop:</p>
  
  <p><strong>update: items or "the array" is dynamic I don't have permanent values.</strong></p>
  
  <p>ex.: <code>for (var i = 0;i &lt; items.length; i++){}</code></p>
  
  <p>Need return the multiplication of all items, only know the total of array (<code>items.length</code>) inside of "<code>for</code>".</p>
  
  <p>So.. 1st. need be cumulative </p>
  
  <p>2nd maybe multiply each inside a loop <code>item[value] * item[value] *</code></p>
  
  <p>3rd maybe <code>if(i == items.length){return total}</code> (ex.: 1*3*4 = 12)</p>
  
  <p>dont know how to cumulative <code> var total = item[value] * item[value] * ... </code> </p>
  
  <pre><code>function **multiplyEach**(item){
    item[1,3,4]; //only ex.:this array have many possibilities of length
    for( var i = 0; i &lt;= item.length; i++){
      var **items** = item[i] * item[i]; 
      if (i == item.length){
        return items;
      }
    }
  }
  </code></pre>
  
  <p>items have NaN or undefined value in debug of Chrome browser. :/ ..</p>