File System

// Reading a file (Asynchronous)
const fs = require('fs');
fs.readFile('example.txt', 'utf8', (err, data) => {
  if (err) throw err;
  console.log(data);
});

// Writing to a file
fs.writeFile('output.txt', 'Hello, world!', (err) => {
  if (err) throw err;
  console.log('File has been saved!');
});