Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fs = require('fs');
- fs.writeFile("test.txt", "Hey there!", function(err) {
- if(err) {
- return console.log(err);
- }
- console.log("The file was saved!");
- });
- fs.readFile('test.txt', 'utf8', function(err, contents) {
- console.log(contents);
- });
- console.log('after calling readFile');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement