Which of these correctly reads a file asynchronously using promises?
- A fs.readFileSync(path)
- B await fs.promises.readFile(path)
- C fs.read(path)
- D require('fs').get(path)
Answer
await fs.promises.readFile(path)
fs.promises provides the promise-based API. It should be used for anything on a request path so the event loop stays free.





