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:
red
green
blue
black
I want to read in each line and store them in a JavaScript array as efficiently as possible. How do you do this?