1
2//Name of the file : appendfile-sync.js
3//file append operation in nodejs
4var fs = require('fs');
5var content = "We are Appending this file synchronously using node.js";
6fs.appendFileSync('assets/new.txt', content);
7console.log("File Appended Successfully");
8
9