title: CSV File's Contents Null in Javascript
body: <p>I am currently working on a website that will display a large amount of data from a csv I have already written. I want to first upload the data to javascript to manipulate the data before displaying it. The CSV file is in the root website directory.</p>
  <p>Here is the code for what I have now:</p>
  <pre><code>    var file = new File([&quot;&quot;], &quot;data.csv&quot;
             , {type:&quot;text/plain&quot;, lastModified: new Date().getTime()});
      const reader= new FileReader();
          
      reader.onload = function() {
          var contents = this.result
          console.log(file)
          console.log(contents)
      },false;
      reader.readAsText( file );
      }
  </code></pre>
  <p>Right now, the file's contents are empty even though my CSV has 500 lines of data. How can I read in the CSV file into javascript so that the data can be manipulated and displayed. The CSV file will be the same every time and will be from the website directory and not from the user uploading a file.</p>