Created
August 28, 2019 12:13
-
-
Save tsh-code/48bd57f75097c08fbefbd72b6155c6fb to your computer and use it in GitHub Desktop.
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
fs.readFile(filePath1, (err, content) => { | |
if (err) // handle error | |
// otherwise do something with the content | |
}) | |
fs.readFile(filePath2, (err, content) => { /* same story */ }) | |
console.log(‘Will happen before any of the reads is finished’) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment