Importing a file in JavaScript (not browser or HTML)
<p>I know it seems like this question may exist elsewhere, but I haven't been able to find a solution for purely JS as a scripting language.</p>

<p>Is there a way for me to import a file (locally or url) like a .csv that I can then operate on?</p>

<p>I'm looking for a purely javascript solution, without HTML or jQuery.</p>

<p>for example, if there was a file called example.txt on your computer with the line "this is an example file, can you import this text?" and you had to print the 4th word in the file, how would you do that with only JS?</p>

<p>Or a .csv that you needed to read off you computer and return a json object of, how would you read in that CSV?</p>

<p>Thanks in advance for any help!</p>