I need to write array to a file, and I don't know how to force a New Line.
var arr = [1,2,a,b,{c:d},[x,y,z],1a]; // some array
for (var i=0; i<=arr; i++)
{
arr[i] = arr[i] + "\n";
}
or just:
arr.split(",").join("\n");
doesn't work.
I just want to dispaly every array index element in a file at a new line.
In a notepad I simply see all '1\n', 'a\n', etc. I heard it's because windows is using '\r\n' instead of '\n' but I guess this will not work on linux then... How to resolve that?