title: Javascript CSV File name and row name
body: <p>I'm creating a csv file using javascript but I don't understand how can I insert a name for the document and also how can I insert a first row with &quot;Name&quot;, &quot;Langitude&quot;, &quot;Longitude&quot;</p>
  <pre><code>function createCSV() {
      console.log(&quot;arrayInfo.length&quot;, arrayInfo.length)
      if (arrayInfo.length &gt; 0) {
          const rows = []
          for (var i = 0; i &lt; arrayInfo.length; i++) {
              rows.push(arrayInfo[i])
          }
          console.log(&quot;rows &quot;, rows)
          let csvContent = &quot;&quot;;
          rows.forEach(function (rowArray) {
              let row = rowArray.join(&quot;,&quot;);
              console.log(&quot;row &quot;, row)
              console.log(&quot;rowArray &quot;, rowArray)
              csvContent += row + &quot;\r\n&quot;;
          });
          console.log(&quot;csvContent &quot;, csvContent, [csvContent])
          var csvData = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
          var csvURL = window.URL.createObjectURL(csvData);
          console.log(&quot;csvData &quot;, csvData)
          window.open(csvURL);
  
      }
      else {
          console.log(&quot;no csv&quot;)
      }
  }
  </code></pre>
  <p>this is the function that I use, In your opinion how can I do?</p>