Answers for "how to append to file in js"

0

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!');
});
Posted by: Guest on January-02-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language