demo_fs_writefile.js:
var fs = require('fs'); //create a file named mynewfile3.txt: fs.writeFile('mynewfile3.txt', 'Hello content!', function (err) { if (err) throw err; console.log('Saved!'); });
C:\Users\My Name>node demo_fs_writefile.js
Saved!