diff --git a/doc/api/stream.md b/doc/api/stream.md index 8ee5fef2a794b2..af85312aa6c135 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1002,7 +1002,7 @@ readable.on('readable', function() { // There is some data to read now. let data; - while (data = this.read()) { + while ((data = this.read()) !== null) { console.log(data); } });