CoderProfile

Quick mode

Stack: Node · 15 questions · 3-5 min

Question 1 of 15

Node

How do you write fs operations?

Choose the option closest to your real coding style.

Option A

const data = fs.readFileSync(path);

Option B

const data = await fs.promises.readFile(path, 'utf8');

Option C

const data = await readFile(path, 'utf8'); // wrapped with typed errors
Change Mode