Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var fs = require('fs');
- var data = "Hello world!\nThis is text written by NodeJS using fs.writeFile()";
- fs.writeFile("Text.txt", data, function(err){
- if(err) throw err;
- console.log("File written successfully!");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement