Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to append to file in js

const fs = require('fs');

fs.appendFile('message.txt', 'data to append', function (err) {
  if (err) throw err;
  console.log('Saved!');
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #append #file #js
ADD COMMENT
Topic
Name
7+1 =