Node.js fs writeFile() with callback function

Description

Node.js fs writeFile() with callback function


var fs = require("fs");

fs.writeFile("./files/async.txt", "Hello world again!", function(error) {
  console.log("File has been written");
});//w  ww  .j av a  2s  .  c om
console.log("Carry on executing");



PreviousNext

Related