Last active
March 17, 2023 19:53
-
-
Save charlenetshos/9316c378ae28bf57ba2ee04bcf6d21c7 to your computer and use it in GitHub Desktop.
Asynchronous Node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
console.log('About to read file content'); | |
fs.readFile('file.md', 'utf-8', function (err, content) { | |
if (err) { | |
return console.log(err); | |
} | |
console.log('Done reading file'); | |
console.log(content); | |
}); | |
console.log('Node.js is based on JS.'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment