title: Reading local text file into a JavaScript array
body: <p>I have a text file in the same folder as my JavaScript file. Both files are stored on my local machine. The .txt file is one word on each line like:</p>
  
  <pre><code>red 
  green
  blue
  black
  </code></pre>
  
  <p>I want to read in each line and store them in a JavaScript array as efficiently as possible. How do you do this?</p>