Question: Which line imports a promise-based version of the readFile method?
- const { readFile } = require(fs).promises
- const { readFile } = require(fs)
- const { readFilePromises: readFile } = require(fs)
- const { readFile } = require(promises)
Answer: The correct answer of the above question is Option A:const { readFile } = require(fs).promises