title: Arraylist to csv export in javascript
body: <p>I would like to make the csv file from the arraylist. So help me to achieve this.</p>
  
  <p>Code Snippet:</p>
  
  <pre><code>$('#csvdownloadbutton').click(function () {
      var myArray = new Array();
      myArray.push("string 1");
      myArray.push("string 2");
  
      //how to export here. based on the myarray
  }
  </code></pre>
  
  <p>When I click the button it should be converted to CSV and downloaded.</p>