title: Add data to new column in csv file with Javascript
body: <p>I want add data to new column in csv file. I using Javascript. I try with <code>'\r\n'</code> but not work. Comma make new row in same column.</p>
  
  <pre><code>for (var i = 0, l = mydata.length; i &lt; l; ++i) {
      csvRows.push(mydata[i].join(','));
  }
  csvRows.push('\r\n'); //here want to go in second column
  csvRows.push(mydata[0].join(',')); //this want write in second column first row
  var csvString = csvRows.join("%0A");
  var a = document.createElement('a');
  a.href = 'data:attachment/csv,' + csvString;
  a.target = '_blank';
  a.download = 'file.csv';
  document.body.appendChild(a);
  a.click();
  </code></pre>
  
  <p>What I must push in <code>csvRows</code> to make new column? <a href="http://jsfiddle.net/nkm2b/222/" rel="nofollow noreferrer">FIDDLE</a> is similar example.</p>