title: Splitting a paragraph in an array to separate variables? NodeJS
body: <p>I have a array, its contents is, lines written like so. </p>
  
  <pre><code>John
  Snow
  foo 
  1234 
  </code></pre>
  
  <p>Is it possible to put each line into its own variable? 
  The max line count will be 7 lines. </p>
  
  <p>I use this code to read the file into an array. </p>
  
  <pre><code>    var fs = require('fs');
      var array = fs.readFileSync('foo').toString().split("\n");
      for(i in array) {
      console.log(array[i]);
  </code></pre>
  
  <p>I was thinking of using the Split and Map function, but that would only result in, </p>
  
  <p>John, Snow, foo ,1234 
  Which is not what I'm after. </p>
  
  <p>My reasoning.</p>
  
  <p>I am working on a little software sharing app,what I was planning, is if one of the packages needs installing, I was going to have a simple system that would allow the installation of the package like so, </p>
  
  <pre><code>unpack 
  install 
  etc 
  </code></pre>
  
  <p>Using internal functions in the app to simplify installation, so the developers don't need to write out large install scripts, I wanted to read line by line in the file, split each line into its own variable or array, then check the value of each array, then start the correct functions. </p>