I've been searching for this a while now, and though my problem seems a lot easier than comparable problems others are posting, I still can't find a solution.
I would like an array to fill with content from a .txt file. The thing is (opposed to other people having this problem), I don't have to do anything with the contents from the txt file, since it's already in the form of [1, 2, 3], [a, b, c], ... etc. So the only thing I'd like to do is print content from a txt file in
Somewhere between <script> and </script>, there is:
var locations = [
*contents of the txt file should go here*
];
Thats it! Is there a way to grab the contents from a txt file and print them in javascript?