Problem in Appending New Line in File Using Javascript

I am trying to append content in File using Javascript. In that I want, each new row should start
with new line but it is not working even after adding “\n”
all the row are appending in single line.
Please see snapshot

Hi Shubham,

Please try : Add one more appendToFile for new line.