title: Convert text file separated with line breaks to an array in JavaScript
body: <p>I have a text file filled with dictionary words that looks something like this:</p>
  <pre><code>banana
  apple
  orange
  lemon
  grape
  </code></pre>
  <p>and I want to be able to convert it to an array so that I can use it in a JavaScript file I am writing:</p>
  <pre><code>[&quot;banana&quot;, &quot;apple&quot;, &quot;orange&quot;, &quot;lemon&quot;, &quot;grape&quot;]
  </code></pre>
  <p>For context, I'm making a request to the text file with the Fetch API. Does anyone know how I would be able to convert this?</p>