Computer scienceBackendNode.jsCore ConceptsInternal modulesFile system module

Write stream

Theory

Message

Report a typo

Write any message that you'd like to share with the world using streams. It can contain any context.

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

var ws = fs.createWriteStream('message.txt');

// missing line

ws.end('Ta-ta!');

No need to rewrite the whole snippet. Just type in the missing line.

Enter a short text

Create a free account to access the full topic