Skip to content

Instantly share code, notes, and snippets.

@tsh-code
Created August 28, 2019 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsh-code/48bd57f75097c08fbefbd72b6155c6fb to your computer and use it in GitHub Desktop.
Save tsh-code/48bd57f75097c08fbefbd72b6155c6fb to your computer and use it in GitHub Desktop.
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