js array from text file
const fs = require('fs')
const makeArrayFromTextFile = (path) => {
  const text = fs.readFileSync(path, 'utf-8')
  const textByLine = text.split('\n')
  return textByLine
}
const array = makeArrayFromTextFile('./array.txt') 
console.log(array) // ['apple', 'orange', 'strawberry']
  
// array.txt
apple
orange
strawberry