Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyNodeJSfs file reading writingSingle-choice MCQ

What does fs.readFile do if you pass a path to a directory instead of a file?

import { readFile } from 'node:fs/promises'; const data = await readFile('/tmp');