I have a 10 million line text file loaded stored as a string in a variable "someString". I want to generate an array where each line is an item. I know that to do that I would do the following:
var files = someString.split("\n");
However, this keeps the line break symbol \n after each item. What is the most efficient way to trim this from each item?