Recall & Review
beginner
What is a Readable stream in Node.js?
A Readable stream is a source of data you can read from, like a file or network connection. It lets you read data piece by piece instead of all at once.
Click to reveal answer
beginner
What does a Writable stream do?
A Writable stream is a destination where you can send data to be saved or processed, like writing to a file or sending data over the network.
Click to reveal answer
intermediate
Explain a Transform stream in Node.js.
A Transform stream is both readable and writable. It takes input data, changes or processes it, then outputs the transformed data.
Click to reveal answer
intermediate
What is a Duplex stream?
A Duplex stream can read and write data independently. Think of it like a two-way street where data flows in both directions at the same time.
Click to reveal answer
beginner
How do Readable and Writable streams differ in usage?
Readable streams provide data to your program, while Writable streams accept data from your program. They serve opposite roles in data flow.
Click to reveal answer
Which stream type allows you to modify data as it passes through?
✗ Incorrect
Transform streams let you read data, change it, and then output the changed data.
What kind of stream can both read and write data independently?
✗ Incorrect
Duplex streams support two-way data flow, reading and writing independently.
If you want to save data to a file, which stream type do you use?
✗ Incorrect
Writable streams are used to send data to destinations like files.
Which stream type is only a source of data?
✗ Incorrect
Readable streams provide data to your program but do not accept data.
Which stream type combines reading and writing but processes data in between?
✗ Incorrect
Transform streams read input, process it, and write the transformed output.
Describe the four main stream types in Node.js and their roles.
Think about data flow direction and processing.
You got /4 concepts.
Explain a real-life example where you might use a Transform stream.
Consider converting file formats or compressing data.
You got /3 concepts.