Computer scienceBackendNode.jsCore ConceptsInternal modulesFile system module

Write stream

Missing line

Report a typo

Here's the start of the code that Jacob wrote for his project:

const fs = require('node:fs');

const myPoem = fs.createWriteStream('poem.txt');

myPoem.write('Some feelings are shallow, some feelings are deep.');

But he forgot one line at the end.

Write a line that will end the process with the following final sentence: Some make us smile, some make us weep.

Enter a short text

Create a free account to access the full topic