title: How to store values from for loop in array using JavaScript?
body: <p>I just wanted to get all the values from the loop in a single array variable <code>details</code> which is declared outside the loop. But, I didn't get it wot work. How do I do this?</p>
  
  <pre><code>var details = [];
  for(i=0;i&lt;taskArray.length;i++){
      details = taskArray[i].concat("-",stateArray[i]);
  }
  </code></pre>